cpc_pctx_take_sample man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]


       cpc_pctx_bind_event,	   cpc_pctx_take_sample,	cpc_pctx_rele,
       cpc_pctx_invalidate - access CPU performance  counters  in  other  pro‐

       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 han‐
       dler created using the libpctx(3LIB) family of functions that allow the
       caller,	also  known as the controlling process, to manipulate the per‐
       formance 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:

		 For cpc_pctx_bind_event(), access to the requested hypervisor
		 event was denied.

		 The  value of the lwpid argument is invalid in the context of
		 the controlled process.

       See attributes(5) for descriptions of the following attributes:

       │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.	  Applications
       should  use  cpc_bind_pctx(3CPC),  cpc_unbind(3CPC),  and  cpc_set_sam‐
       ple(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 version
       of this API.  In the current implementation, the flags  field  must  be
       specified as 0.

				 Mar 05, 2007	     CPC_PCTX_BIND_EVENT(3CPC)

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net