- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have just started using an evaluation version of vTune. I have a question on SAV.
How does vTune handle context switches that happen in the middle of sampling....?
Say, the counters have not reached the "SAV" value, and a context switch happens -- what happens to the counters that are in the middle of sampling? Does vTune handle that scenario?
How does vTune handle context switches that happen in the middle of sampling....?
Say, the counters have not reached the "SAV" value, and a context switch happens -- what happens to the counters that are in the middle of sampling? Does vTune handle that scenario?
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Context switches do not impact sampling, since sampling is system-wide. The PMU (performance monitoring unit) watches the hardware and when the event count register overflows an interrupt is triggered and the execution context is collected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
True -- SAV is done for system wide.... but is reported process-wise, right?
So, when the CPU notifies it could "possibly" involve samples from the previous process too...., right?
So, I was wondering if vTune is smart enough to collect half-filled samples on context switches?
( SAV for 1ms should be good enough... as most OSes hve 10ms timer tick.. but still this is a corner case and I was wondering if vTune was handling it.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure I understand your question but, in general, the answer is no. The VTune analyzer is not keeping track of context switches so it can't do anything special with respect to them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, Pls allow me to illustrate...
Say we have programmed a countersuch that a counter-overflow interrupt occurs after 10,000 events.
Process Cumulative Event Count vTune Action
-----------------------------------------------------------------------------------------
services.exe 1000none
mplayer.exe 4000none
sse_test.exe 8000none
svchost.exe10000vTune records 1 sample for "svchost.exe"
Now, all 10000 events are attributed to "svchost.exe". No?
If vTune had tracked context switches (god knows how..), it would have recorded 1000 events for services.exe, 3000 events for mplayer.exe, 4000 events for sse_test.exe and 2000 events for svchost.exe.
I hope my point is clear to you now. Can you share your thoughts on this?
Thank you,
Best Rgards,
Sarnath
Say we have programmed a countersuch that a counter-overflow interrupt occurs after 10,000 events.
Process Cumulative Event Count vTune Action
-----------------------------------------------------------------------------------------
services.exe 1000none
mplayer.exe 4000none
sse_test.exe 8000none
svchost.exe10000vTune records 1 sample for "svchost.exe"
Now, all 10000 events are attributed to "svchost.exe". No?
If vTune had tracked context switches (god knows how..), it would have recorded 1000 events for services.exe, 3000 events for mplayer.exe, 4000 events for sse_test.exe and 2000 events for svchost.exe.
I hope my point is clear to you now. Can you share your thoughts on this?
Thank you,
Best Rgards,
Sarnath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand what you are saying. I think my response to you in the other thread answers this question, also. Let me know, if it does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, it does. Thanks for your time!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page