File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,10 @@ int main(int argc, char * argv[])
295295 bool show_partial_core_output = false ;
296296 std::bitset<MAX_CORES> ycores;
297297
298+ // Occasionally the memory is not properly nulled because counters appear to
299+ // be programmed even without given arguments so making really sure
300+ memset ( ®s, 0 , sizeof (regs) );
301+
298302 conf.fixedCfg = NULL ; // default
299303 conf.nGPCounters = 4 ;
300304 conf.gpCounterCfg = regs;
@@ -432,7 +436,10 @@ int main(int argc, char * argv[])
432436 }
433437 continue ;
434438 }
435- } while (argc > 1 ); // end of command line partsing loop
439+ } while (argc > 1 ); // end of command line parsing loop
440+
441+ if ( cur_event == 0 )
442+ cerr << " WARNING: you did not provide any custom events, is this intentional?\n " ;
436443
437444 conf.OffcoreResponseMsrValue [0 ] = events[0 ].msr_value ;
438445 conf.OffcoreResponseMsrValue [1 ] = events[1 ].msr_value ;
You can’t perform that action at this time.
0 commit comments