MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


CPU Performance Counters Library Functions
                                        cpcpctxbindevent(3CPC)



NAME
     cpcpctxbindevent,  cpcpctxtakesample,   cpcpctxrele,
     cpcpctxinvalidate  -  access  CPU  performance counters in
     other processes

SYNOPSIS
     cc [ flag... ] file... -lcpc -lpctx [ library... ]
     #include 
     #include 

     int cpcpctxbindevent(pctxt *pctx, idt lwpid, cpceventt *event,
          int flags);


     int cpcpctxtakesample(pctxt *pctx, idt lwpid, cpceventt *event);


     int cpcpctxrele(pctxt *pctx, idt lwpid);


     int cpcpctxinvalidate(pctxt *pctx, idt lwpid);


DESCRIPTION
     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  control-
     ling  process, to manipulate the performance counters in the
     context of a controlled process. The controlled  process  is
     described  by the pctx argument, which must be obtained from
     an invocation of pctxcapture(3CPC) or pctxcreate(3CPC) and
     passed  to  the functions described on this page in the con-
     text of an event handler.


     The  semantics  of  the   functions   cpcpctxbindevent(),
     cpcpctxtakesample(),  and  cpcpctxrele()  are  directly
     analogous to those of  cpcbindevent(),  cpctakesample(),
     and  cpcrele() described on the cpcbindevent(3CPC) manual
     page.


     The cpcpctxinvalidate() function  allows  the  performance
     context  to  be invalidated in an LWP in the controlled pro-
     cess.

RETURN VALUES
     These functions return  0  on  success.   On  failure,  they
     return -1 and set errno to indicate the error.





SunOS 5.11          Last change: 05 Mar 2007                    1






CPU Performance Counters Library Functions
                                        cpcpctxbindevent(3CPC)



ERORS
     The   cpcpctxbindevent(),   cpcpctxtakesample(),   and
     cpcpctxrele()  functions  return the same errno values the
     analogous functions described  on  the  cpcbindevent(3CPC)
     manual page. In addition, these function may fail if:

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


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


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Unsafe                      
    
     Interface Stability          Evolving                    
    


SEE ALSO
     cpc(3CPC),        cpcbindevent(3CPC),        libcpc(3LIB),
     pctxcapture(3CPC), pctxcreate(3CPC), attributes(5)

NOTES
     The      cpcpctxbindevent(),       cpcpctxinvalidate(),
     cpcpctxrele(),  and cpcpctxtakesample() functions exist
     for binary compatibility only. Source containing these func-
     tions  will  not  compile.  These functions are obsolete and
     might be removed in a future  release.  Applications  should
     use      cpcbindpctx(3CPC),      cpcunbind(3CPC),     and
     cpcsetsample(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.







SunOS 5.11          Last change: 05 Mar 2007                    2






CPU Performance Counters Library Functions
                                        cpcpctxbindevent(3CPC)






















































SunOS 5.11          Last change: 05 Mar 2007                    3






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™