1cpc_event_diff(3CPCC)PU Performance Counters Library Functioncspc_event_diff(3CPC)
2
3
4
6 cpc_event_diff, cpc_event_accum - simple difference and accumulate
7 operations
8
10 cc [ flag... ] file... −lcpc [ library... ]
11 #include <libcpc.h>
12
13 void cpc_event_accum(cpc_event_t *accum, cpc_event_t *event);
14
15
16 void cpc_event_diff(cpc_event_t *diff, cpc_event_t *after,
17 cpc_event_t *before);
18
19
21 The cpc_event_accum() and cpc_event_diff() functions perform common
22 accumulate and difference operations on cpc_event(3CPC) data struc‐
23 tures. Use of these functions increases program portability, since
24 structure members are not referenced directly .
25
26 cpc_event_accum()
27 The cpc_event_accum() function adds the ce_pic fields of event into the
28 corresponding fields of accum. The ce_hrt field of accum is set to the
29 later of the times in event and accum.
30
31 SPARC:
32 The function adds the contents of the ce_tick field of event into the
33 corresponding field of accum.
34
35 x86:
36 The function adds the contents of the ce_tsc field of event into the
37 corresponding field of accum.
38
39 cpc_event_diff()
40 The cpc_event_diff() function places the difference between the ce_pic
41 fields of after and before and places them in the corresponding field
42 of diff. The ce_hrt field of diff is set to the ce_hrt field of after.
43
44 SPARC:
45 Additionally, the function computes the difference between the ce_tick
46 fields of after and before, and places it in the corresponding field of
47 diff.
48
49 x86:
50 Additionally, the function computes the difference between the ce_tsc
51 fields of after and before, and places it in the corresponding field of
52 diff.
53
55 See attributes(5) for descriptions of the following attributes:
56
57
58
59
60 ┌─────────────────────────────┬─────────────────────────────┐
61 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
62 ├─────────────────────────────┼─────────────────────────────┤
63 │Interface Stability │Obsolete │
64 ├─────────────────────────────┼─────────────────────────────┤
65 │MT-Level │MT-Safe │
66 └─────────────────────────────┴─────────────────────────────┘
67
69 cpc(3CPC), cpc_buf_add(3CPC), cpc_buf_sub(3CPC), cpc_event(3CPC),
70 libcpc(3LIB), attributes(5)
71
73 The cpc_event_accum() and cpc_event_diff() functions exist for binary
74 compatibility only. Source containing these functions will not compile.
75 These functions are obsolete and might be removed in a future release.
76 Applications should use cpc_buf_add(3CPC) and cpc_buf_sub(3CPC)
77 instead.
78
79
80
81SunOS 5.11 28 Mar 2005 cpc_event_diff(3CPC)