Is there a way to tweak with the resolution of the performance counter (event counters). Basically I am doing hotspot analysis for an algorithm and I feel that the execution time is really small that i am not able to get proper results. So, i was wondering if there is a way to reduce the threashold for the hwardware events to trigger.
The problem is that my hotspot functions are consistent and I am assuming that the reason for this is the resolution.
If you use hotspots, please don't usesample interval to 1ms, I suggest to use 3ms. I think that you can run your critical functions several times,for example, put them into loop - in order to collect more samples.
- The hotspots, concurrency, and locks and waits analysis types are all based on software timers. The sampling interval is set with the 'CPU sampling interval', and defaults to a 10 ms interval. One advantage of these analysis types is stack information.
- The other analysis types (lightweight hotspots, and all the others) are based on the hardware event counters. The sampling interval for these types are set with the 'Sample-After' value (can be adjusted with custom analysis types). This sampling interval can also be indirectly adjusted with the 'Duration time estimate' item in the Project Properties menu. Or -target-duration-type on the command line. It basically applies a multiplier to all the 'sample-after' values in an analysis types.).
Hopefully this should give a little background to the other recommendations in this thread.
>>>Is there a way to tweak with the resolution of the performance counter (event counters>>>
The time mesurement resolution should be ~3ms.If your code executes faster you need to run it in small loop.