1cpc_pctx_bind_eventC(P3UCPPCe)rformance Counters Library Funccptci_opncstx_bind_event(3CPC)
2
3
4

NAME

6       cpc_pctx_bind_event,        cpc_pctx_take_sample,        cpc_pctx_rele,
7       cpc_pctx_invalidate - access CPU performance  counters  in  other  pro‐
8       cesses
9

SYNOPSIS

11       cc [ flag... ] file... −lcpc −lpctx [ library... ]
12       #include <libpctx.h>
13       #include <libcpc.h>
14
15       int cpc_pctx_bind_event(pctx_t *pctx, id_t lwpid, cpc_event_t *event,
16            int flags);
17
18
19       int cpc_pctx_take_sample(pctx_t *pctx, id_t lwpid, cpc_event_t *event);
20
21
22       int cpc_pctx_rele(pctx_t *pctx, id_t lwpid);
23
24
25       int cpc_pctx_invalidate(pctx_t *pctx, id_t lwpid);
26
27

DESCRIPTION

29       These  functions are designed to be run in the context of an event han‐
30       dler created using the libpctx(3LIB) family of functions that allow the
31       caller,  also  known as the controlling process, to manipulate the per‐
32       formance counters in the context of  a  controlled  process.  The  con‐
33       trolled  process  is  described  by  the  pctx  argument, which must be
34       obtained from an invocation of pctx_capture(3CPC) or  pctx_create(3CPC)
35       and passed to the functions described on this page in the context of an
36       event handler.
37
38
39       The    semantics    of     the     functions     cpc_pctx_bind_event(),
40       cpc_pctx_take_sample(),  and  cpc_pctx_rele() are directly analogous to
41       those of cpc_bind_event(), cpc_take_sample(), and cpc_rele()  described
42       on the cpc_bind_event(3CPC) manual page.
43
44
45       The cpc_pctx_invalidate() function allows the performance context to be
46       invalidated in an LWP in the controlled process.
47

RETURN VALUES

49       These functions return 0 on success.  On failure, they  return  −1  and
50       set errno to indicate the error.
51

ERRORS

53       The  cpc_pctx_bind_event(), cpc_pctx_take_sample(), and cpc_pctx_rele()
54       functions  return  the  same  errno  values  the  analogous   functions
55       described  on  the cpc_bind_event(3CPC) manual page. In addition, these
56       function may fail if:
57
58       EACCES    For cpc_pctx_bind_event(), access to the requested hypervisor
59                 event was denied.
60
61
62       ESRCH     The  value of the lwpid argument is invalid in the context of
63                 the controlled process.
64
65

ATTRIBUTES

67       See attributes(5) for descriptions of the following attributes:
68
69
70
71
72       ┌─────────────────────────────┬─────────────────────────────┐
73       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │MT-Level                     │Unsafe                       │
76       ├─────────────────────────────┼─────────────────────────────┤
77       │Interface Stability          │Evolving                     │
78       └─────────────────────────────┴─────────────────────────────┘
79

SEE ALSO

81       cpc(3CPC),  cpc_bind_event(3CPC),   libcpc(3LIB),   pctx_capture(3CPC),
82       pctx_create(3CPC), attributes(5)
83

NOTES

85       The  cpc_pctx_bind_event(), cpc_pctx_invalidate(), cpc_pctx_rele(), and
86       cpc_pctx_take_sample() functions exist for binary  compatibility  only.
87       Source containing these functions will not compile. These functions are
88       obsolete and might be removed in a future release. Applications  should
89       use  cpc_bind_pctx(3CPC),  cpc_unbind(3CPC),  and  cpc_set_sample(3CPC)
90       instead.
91
92
93       The capability to create and analyze overflow events in other processes
94       is  not  available, though it may be made available in a future version
95       of this API.  In the current implementation, the flags  field  must  be
96       specified as 0.
97
98
99
100SunOS 5.11                        05 Mar 2007        cpc_pctx_bind_event(3CPC)
Impressum