Skip to content

Commit 0496bc3

Browse files
Add new debug print
This new print clarifies what the next set of prints are referring to. It also slightly optimises the subsequent control flow.
1 parent e923190 commit 0496bc3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/fiat/drhook/drhook_papi.c

+6-7
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,15 @@ int dr_hook_papi_start_threads(int* events){
232232
if (!silent) printf("DRHOOK:PAPI: Event set %d created for thread %d\n",events[thread],thread);
233233

234234
int prof_papi_numcntrs=NPAPICNTRS;
235+
if (!silent && drhook_papi_rank==0 && thread==0)
236+
printf("DRHOOK:PAPI: Attempting to add events to event set:\n");
237+
235238
for (int counter=0; counter < prof_papi_numcntrs; counter ++){
236239
int eventCode;
237-
238-
if (!silent) {
240+
241+
if (!silent && drhook_papi_rank==0 && thread==0) {
239242
snprintf(pmsg,STD_MSG_LEN,"DRHOOK:PAPI: %s (%s)",hookCounters[counter][0],hookCounters[counter][1]);
240-
if (drhook_papi_rank==0) {
241-
if (thread==0) {
242-
printf("%s\n",pmsg);
243-
}
244-
}
243+
printf("%s\n",pmsg);
245244
}
246245

247246
papiErr=PAPI_event_name_to_code(hookCounters[counter][0],&eventCode);

0 commit comments

Comments
 (0)