Skip to content
Snippets Groups Projects
Commit cd34dc74 authored by Tobias Bouschen's avatar Tobias Bouschen
Browse files

Remove Papi stub class

parent 2a3cab71
No related branches found
No related tags found
No related merge requests found
#include "/home/fussel/Dokumente/Uni/SWP_Cluster/papi/src/papi.h"
#include <stdio.h>
//handle performance counter overflow
void handler(int EventSet, void *address, long_long overflow_vector, void *context)
{
/* - check event type
* - kprint error/warning:
* - which thread,
* - which task (dont know how)
* - unregister event
*/
int Events[1], number = 1,retval;
retval = PAPI_get_overflow_event_index(EventSet, overflow_vector, Events, &number);
if(retval == PAPI_OK){
char* EventName;
retval = PAPI_event_code_to_name(Events[0], EventName);
if(strncmp(EventName,"PAPI_TOT_INS",13)){
unsigned long tid = PAPI_thread_id();
perror("Plan error occurred on thread %lu",tid);
if (PAPI_remove_event(EventSet,PAPI_TOT_INS) != PAPI_OK){
handle_error(1);
}
}
}else{
handle_error(1);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment