Skip to content

Commit

Permalink
Fix invalid arguments error to PAPI_list_events
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Jul 24, 2024
1 parent e3ff319 commit bcd9d78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fiat/drhook/drhook_papi.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ int dr_hook_papi_start_threads(int* events){
}
}

int number;
int * checkEvents=malloc(prof_papi_numcntrs*sizeof(int));
papiErr = PAPI_list_events(events[thread],checkEvents , &number);
if ( papiErr != PAPI_OK){
int number = prof_papi_numcntrs;
int* checkEvents=malloc(prof_papi_numcntrs*sizeof(int));
papiErr = PAPI_list_events(events[thread], checkEvents, &number);
if (papiErr != PAPI_OK){
snprintf(pmsg,STD_MSG_LEN,"DRHOOK:PAPI: Error querying events - %d=%s",papiErr,PAPI_strerror(papiErr));
printf("%s\n",pmsg);
return 0;
Expand Down

0 comments on commit bcd9d78

Please sign in to comment.