PCPIntro (3) Linux Manual Page
Please check the manual page PCPIntro(3).
Section 3: library functions
Please check the manual page PCPIntro(3).
PAPI_write – Write counter values into counters. Synopsis Detailed Description Parameters: EventSet an integer handle for a PAPI event set as created by PAPI_create_eventset *values an array to hold the counter values of the counting events Return values: PAPI_ENOEVST The EventSet specified does not exist. PAPI_ECMP PAPI_write() is not implemented for this architecture. PAPI_ESYS The…
PAPI_unregister_thread – Notify PAPI that a thread has ‘disappeared’. Synopsis Detailed Description Return values: PAPI_ENOMEM Space could not be allocated to store the new thread information. PAPI_ESYS A system or C library call failed inside PAPI, see the errno variable. PAPI_ECMP Hardware counters for this thread could not be initialized. PAPI_unregister_thread should be called when…
PAPI_unlock – Unlock one of the mutex variables defined in papi.h. Synopsis Detailed Description Parameters: lck an integer value specifying one of the two user locks: PAPI_USR1_LOCK or PAPI_USR2_LOCK PAPI_unlock() unlocks the mutex acquired by a call to PAPI_lock . See Also: PAPI_thread_init Author Generated automatically by Doxygen for PAPI from the source code.
PAPI_thread_init – Initialize thread support in the PAPI library. Synopsis Detailed Description @param *id_fn Pointer to a function that returns current thread ID. PAPI_thread_init initializes thread support in the PAPI library. Applications that make no use of threads do not need to call this routine. This function MUST return a UNIQUE thread ID for every…
PAPI_thread_id – Get the thread identifier of the current thread. Synopsis Detailed Description @retval PAPI_EMISC is returned if there are no threads registered. @retval -1 is returned if the thread id function returns an error. This function returns a valid thread identifier. It calls the function registered with PAPI through a call to PAPI_thread_init(). unsigned…
PAPI_strerror – Returns a string describing the PAPI error code. Synopsis Detailed Description C Interface: #include <papi.h> char * PAPI_strerror( int errorCode ); Parameters: code — the error code to interpret Return values: *error — a pointer to the error string. NULL — the input error code to PAPI_strerror() is invalid. PAPI_strerror() returns a pointer to the error message…
PAPI_stop_counters – Stop counting hardware events and reset values to zero. Synopsis Detailed Description @par C Interface: #include <papi.h> @n int PAPI_stop_counters( long long *values, int array_len ); Parameters: *values an array where to put the counter values array_len the number of items in the *values array Postcondition: After this function is called, the values…
PAPI_stop – Stop counting hardware events in an event set. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_stop( int EventSet, long long * values ); Parameters: EventSet — an integer handle for a PAPI event set as created by PAPI_create_eventset values — an array to hold the counter values of the counting events Return values: PAPI_OK PAPI_EINVAL One or more…
PAPI_state – Return the counting state of an EventSet. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_state( int EventSet, int * status ); Parameters: EventSet — an integer handle for a PAPI event set as created by PAPI_create_eventset status — an integer containing a boolean combination of one or more of the following nonzero constants as defined in the PAPI…
PAPI_start_counters – Start counting hardware events. Synopsis Detailed Description @par C Interface: #include <papi.h> @n int PAPI_start_counters( int *events, int array_len ); Parameters: *events an array of codes for events such as PAPI_INT_INS or a native event code array_len the number of items in the *events array Return values: PAPI_EINVAL One or more of the…
PAPI_start – Start counting hardware events in an event set. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_start( int EventSet ); Parameters: EventSet — an integer handle for a PAPI event set as created by PAPI_create_eventset Return values: PAPI_OK PAPI_EINVAL — One or more of the arguments is invalid. PAPI_ESYS — A system or C library call failed…
PAPI_sprofil_t – Synopsis Data Fields void * pr_base unsigned pr_size caddr_t pr_off unsigned pr_scale Detailed Description Field Documentation void* PAPI_sprofil_t::pr_base buffer base caddr_t PAPI_sprofil_t::pr_off pc start address (offset) unsigned PAPI_sprofil_t::pr_scale pc scaling factor: fixed point fraction 0xffff ~= 1, 0x8000 == .5, 0x4000 == .25, etc. also, two extensions 0x1000 == 1, 0x2000 == 2…
PAPI_sprofil – Generate PC histogram data from multiple code regions where hardware counter overflow occurs. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_sprofil( PAPI_sprofil_t * prof, int profcnt, int EventSet, int EventCode, int threshold, int flags ); Parameters: *prof pointer to an array of PAPI_sprofil_t structures. Each copy of the structure contains the following: • buf — pointer to…
PAPI_shutdown – Finish using PAPI and free all related resources. Synopsis Detailed Description C Prototype: #include <papi.h> void PAPI_shutdown( void ); PAPI_shutdown() is an exit function used by the PAPI Library to free resources and shut down when certain error conditions arise. It is not necessary for the user to call this function, but doing so allows the…
PAPI_shlib_info_t – Synopsis Data Fields PAPI_address_map_t * map int count Detailed Description Author Generated automatically by Doxygen for PAPI from the source code.
PAPI_set_thr_specific – Store a pointer to a thread specific data structure. Synopsis Detailed Description @par Prototype: #include <papi.h> @n int PAPI_set_thr_specific( int tag, void *ptr ); @param tag An identifier, the value of which is either PAPI_USR1_TLS or PAPI_USR2_TLS. This identifier indicates which of several data structures associated with this thread is to be accessed….
PAPI_set_opt – Set PAPI library or event set options. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_set_opt( int option, PAPI_option_t * ptr ); Parameters: option Defines the option to be set. Possible values are briefly described in the table below. ptr Pointer to a structure determined by the selected option. See PAPI_option_t for a description of possible structures. Return…
PAPI_set_multiplex – Convert a standard event set to a multiplexed event set. Synopsis Detailed Description C Interface: #include <papi.h> int PAPI_set_multiplex( int EventSet ); Parameters: EventSet an integer handle for a PAPI event set as created by PAPI_create_eventset Return values: PAPI_OK PAPI_EINVAL — One or more of the arguments is invalid, or the EventSet is already multiplexed. PAPI_ENOCMP —…
PAPI_set_granularity – Set the default counting granularity for eventsets bound to the cpu component. Synopsis Detailed Description @par C Prototype: #include <papi.h> @n int PAPI_set_granularity( int granularity ); @param — granularity one of the following constants as defined in the papi.h header file @arg PAPI_GRN_THR — Count each individual thread @arg PAPI_GRN_PROC — Count each…