Inyour project, youmay do same wayof VTune Amplifier XE - set event counter number (1M?) for Instruction Retired event (other event counter registers will be cleaned as zero), then your application will run - if1M instruction will be executed, underflow will happen, then read preferred performance counter values.
P.S> This forum isfor talking about usingVTune product, problem, solution, etc.
Samples of all events (analysis type youchoose) will be collected respectively for their different intervals.
1. There is no mechanism to know other events after 1M instructions executed, because all events (including instructions retired) work independently.
2. The tool has timeline report at bottom of bottom-report, youmight select time range to zoom-in/filter results, you can verify if "instructions retired" is 1M, then observe other events data. Also you may redo or seek next 1M to 2M.
3. You meant that you can't changeSAV for some events. That is right! All SAVsin pre-definedanalysis typecan't be modified. Youmight create yourhardware event-based analysis to change SAVs, if like.
P.S>I assume that you are using VTune Amplifier XE 2011
The performance monitoring units (PMU) can also beused in a way that you only count the events that occur. This is however very different from the sampling that VTune is doing. In particular, you cannot tie back the information to the code section where the events were happening. How you can use the hardware counters in this way is described in this ISN article. However, the routines do not provide the capability to use the PMU to trigger interrupts.