Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cpc_event_diff(3cpc) [opensolaris man page]

cpc_event_diff(3CPC)				    CPU Performance Counters Library Functions				      cpc_event_diff(3CPC)

NAME
cpc_event_diff, cpc_event_accum - simple difference and accumulate operations SYNOPSIS
cc [ flag... ] file... -lcpc [ library... ] #include <libcpc.h> void cpc_event_accum(cpc_event_t *accum, cpc_event_t *event); void cpc_event_diff(cpc_event_t *diff, cpc_event_t *after, cpc_event_t *before); DESCRIPTION
The cpc_event_accum() and cpc_event_diff() functions perform common accumulate and difference operations on cpc_event(3CPC) data struc- tures. Use of these functions increases program portability, since structure members are not referenced directly . cpc_event_accum() The cpc_event_accum() function adds the ce_pic fields of event into the corresponding fields of accum. The ce_hrt field of accum is set to the later of the times in event and accum. SPARC: The function adds the contents of the ce_tick field of event into the corresponding field of accum. x86: The function adds the contents of the ce_tsc field of event into the corresponding field of accum. cpc_event_diff() The cpc_event_diff() function places the difference between the ce_pic fields of after and before and places them in the corresponding field of diff. The ce_hrt field of diff is set to the ce_hrt field of after. SPARC: Additionally, the function computes the difference between the ce_tick fields of after and before, and places it in the corresponding field of diff. x86: Additionally, the function computes the difference between the ce_tsc fields of after and before, and places it in the corresponding field of diff. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
cpc(3CPC), cpc_buf_add(3CPC), cpc_buf_sub(3CPC), cpc_event(3CPC), libcpc(3LIB), attributes(5) NOTES
The cpc_event_accum() and cpc_event_diff() functions exist for binary compatibility only. Source containing these functions will not com- pile. These functions are obsolete and might be removed in a future release. Applications should use cpc_buf_add(3CPC) and cpc_buf_sub(3CPC) instead. SunOS 5.11 28 Mar 2005 cpc_event_diff(3CPC)

Check Out this Related Man Page

cpc_pctx_bind_event(3CPC)												 cpc_pctx_bind_event(3CPC)

NAME
cpc_pctx_bind_event, cpc_pctx_take_sample, cpc_pctx_rele, cpc_pctx_invalidate - access CPU performance counters in other processes SYNOPSIS
cc [ flag... ] file... -lcpc -lpctx [ library... ] #include <libpctx.h> #include <libcpc.h> int cpc_pctx_bind_event(pctx_t *pctx, id_t lwpid, cpc_event_t *event, int flags); int cpc_pctx_take_sample(pctx_t *pctx, id_t lwpid, cpc_event_t *event); int cpc_pctx_rele(pctx_t *pctx, id_t lwpid); int cpc_pctx_invalidate(pctx_t *pctx, id_t lwpid); These functions are designed to be run in the context of an event handler created using the libpctx(3LIB) family of functions that allow the caller, also known as the controlling process, to manipulate the performance counters in the context of a controlled process. The con- trolled process is described by the pctx argument, which must be obtained from an invocation of pctx_capture(3CPC) or pctx_create(3CPC) and passed to the functions described on this page in the context of an event handler. The semantics of the functions cpc_pctx_bind_event(), cpc_pctx_take_sample(), and cpc_pctx_rele() are directly analogous to those of cpc_bind_event(), cpc_take_sample(), and cpc_rele() described on the cpc_bind_event(3CPC) manual page. The cpc_pctx_invalidate() function allows the performance context to be invalidated in an LWP in the controlled process. These functions return 0 on success. On failure, they return -1 and set errno to indicate the error. The cpc_pctx_bind_event(), cpc_pctx_take_sample(), and cpc_pctx_rele() functions return the same errno values the analogous functions described on the cpc_bind_event(3CPC) manual page. In addition, these function may fail if: ESRCH The value of the lwpid argument is invalid in the context of the controlled process. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ cpc(3CPC), cpc_bind_event(3CPC), libcpc(3LIB), pctx_capture(3CPC), pctx_create(3CPC), attributes(5) The cpc_pctx_bind_event(), cpc_pctx_invalidate(), cpc_pctx_rele(), and cpc_pctx_take_sample() functions exist for binary compatibility only. Source containing these functions will not compile. These functions are obsolete and might be removed in a future release. Applica- tions should use cpc_bind_pctx(3CPC), cpc_unbind(3CPC), and cpc_set_sample(3CPC) instead. The capability to create and analyze overflow events in other processes is not available, though it may be made available in a future ver- sion of this API. In the current implementation, the flags field must be specified as 0. 28 Mar 2005 cpc_pctx_bind_event(3CPC)
Man Page