Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Counter Monitor and Sampling

Intel_C_Intel
Employee
626 Views
As you know, VTune contains 3 main data collectors: Sampling, Counter Monitor and Call Graph. Here I would like to point your attention on the Counter Monitor collector.

The best way to understand Counter Monitor is to compare it with Sampling.

1. Both Sampling and Counter Monitor are system-wide profilers, as opposite to Call Graph, which is an application profiler.
2. Sampling monitors processor (hardware) events (ex. cache misses, clock ticks) - Counter Monitor monitors OS (system), and motherboard (if your motherboard support this) events (ex. for OS event: page faults, processor queue length, memory usage, etc.)
3. Sampling results are statistical and can be processed only at the end of the run as one shot - Counter Monitor results are continuous in time, much like graph of your heart activity, you can get from your doctor.
4. Sampling can monitor only limited number of events per single run - Counter Monitor monitors all counters at the same time.

But the most powerful mode of both Counter Monitor and Sampling - run Counter Monitor as a master collector and Sampling as a secondary one. You can create such collector configuration either using Counter Monitor wizard or manually, using Advanced Activity Configuration wizard. In such mode Sampling associates each sample with time stamp, using Counter Monitor time scale. After collection finished, you start analysis from Counter Monitor results. Let's assume, you identified some time period, that you would like to analyze dipper. No problem - just select appropriate time range in the Counter Monitor results and dive into. Counter Monitor will extract relevant Sampling events range, create new Sampling activity result and switch to it. Now you can continue with this new Sampling results or switch back to Counter Monitor results to continue investigation.

So, what we did ? We started analyzing OS system wide events (very high level), identified problematic time interval and switched to processor hardware system wide events (very low level), that were recorded only during this time interval, in order to understand, what exactly happened in the system.
0 Kudos
2 Replies
leech
Beginner
626 Views
This is very helpful. Thank you!

Leech
0 Kudos
Sergey_P_Intel
Employee
626 Views
One correction: in fact it is Sampling who is Master collector. And one clarification: to dive into a selected region on CM chart one has to press "Drill down" button on related CM toolbar (the one with a icon of a drill).

Regards -
Serge
0 Kudos
Reply