Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

papi_get_overflow_event_index(3) [centos man page]

PAPI_get_overflow_event_index(3)				       PAPI					  PAPI_get_overflow_event_index(3)

NAME
PAPI_get_overflow_event_index - converts an overflow vector into an array of indexes to overflowing events SYNOPSIS
Detailed Description @param EventSet an integer handle to a PAPI event set as created by PAPI_create_eventset @param overflow_vector a vector with bits set for each counter that overflowed. This vector is passed by the system to the overflow handler routine. @param *array an array of indexes for events in EventSet. No more than *number indexes will be stored into the array. @param *number On input the variable determines the size of the array. On output the variable contains the number of indexes in the array. @retval PAPI_EINVAL One or more of the arguments is invalid. This could occur if the overflow_vector is empty (zero), if the array or number pointers are NULL, if the value of number is less than one, or if the EventSet is empty. @retval PAPI_ENOEVST The EventSet specified does not exist. @par Examples void handler(int EventSet, void *address, long_long overflow_vector, void *context){ int Events[4], number, i; int total = 0, retval; printf("Overflow #%d Handler(%d) Overflow at %p! vector=0x%llx0, total, EventSet, address, overflow_vector); total++; number = 4; retval = PAPI_get_overflow_event_index(EventSet, overflow_vector, Events, &number); if(retval == PAPI_OK) for(i=0; i<number; i++) printf("Event index[%d] = %d", i, Events[i]);} * @see PAPI_overflow Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_get_overflow_event_index(3)

Check Out this Related Man Page

PAPI_attach(3)							       PAPI							    PAPI_attach(3)

NAME
PAPI_attach - Attach PAPI event set to the specified thread id. SYNOPSIS
Detailed Description @par C Interface: int PAPI_attach( int EventSet, unsigned long tid ); PAPI_attach is a wrapper function that calls PAPI_set_opt to allow PAPI to monitor performance counts on a thread other than the one currently executing. This is sometimes referred to as third party monitoring. PAPI_attach connects the specified EventSet to the specifed thread; PAPI_detach breaks that connection and restores the EventSet to the original executing thread. @param EventSet An integer handle for a PAPI EventSet as created by PAPI_create_eventset. @param tid A thread id as obtained from, for example, PAPI_list_threads or PAPI_thread_id. @retval PAPI_ECMP This feature is unsupported on this component. @retval PAPI_EINVAL One or more of the arguments is invalid. @retval PAPI_ENOEVST The event set specified does not exist. @retval PAPI_EISRUN The event set is currently counting events. @par Examples: * int EventSet = PAPI_NULL; * unsigned long pid; * pid = fork( ); * if ( pid <= 0 ) * exit( 1 ); * if ( PAPI_create_eventset( &EventSet ) != PAPI_OK ) * exit( 1 ); * // Add Total Instructions Executed to our EventSet * if ( PAPI_add_event( EventSet, PAPI_TOT_INS ) != PAPI_OK ) * exit( 1 ); * // Attach this EventSet to the forked process * if ( PAPI_attach( EventSet, pid ) != PAPI_OK ) * exit( 1 ); * See Also: PAPI_set_opt PAPI_list_threads PAPI_thread_id PAPI_thread_init Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_attach(3)
Man Page

3 More Discussions You Might Find Interesting

1. Programming

Extern variable.

file1.c int a1; int main() { a1 = 2; printf("\na1 = %d\n", a1); next(); printf("\na1 = %d\n", a1); next1(); printf("\na1 = %d\n", a1); } file2.c #include <stdio.h> int b1 = 0; void next(void) (1 Reply)
Discussion started by: Tanvirk
1 Replies

2. Programming

pgrep returns 256

Hi Everyone, I have a strange behaviour In my c program i use this line: int retval = system("pgrep encoder"); while i expect retval to contain 0,1,2,3 i get 256. did i do something wrong? thanks, Alex (2 Replies)
Discussion started by: alex889
2 Replies

3. Shell Programming and Scripting

Help With Events Predictor - Your Predictions Wanted!

Excuse me for cross-posting, but as no-one reads the Members Forum, it seems, I will leave this here for a while: Hi. We're looking to inject some life into our Events Predictor feature, and recently assigned member ni2 to manage it. If you could help out by offering predictions you would... (0 Replies)
Discussion started by: Scott
0 Replies