Context Switches which obtained by VTune is much fewer than the true Context Switches

Context Switches which obtained by VTune is much fewer than the true Context Switches

I used Hardware Event-based Sampling Analysis 0 Analysis or Advanced Hotspots Analysis to collect the total Context Switches of a program, but the number of Context Switches that I got was much fewer than the truth. I don't know the reason.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Please explain why you think it was "fewer than the truth."

You will only see context switches for the application that VTune Amplifier XE launched.


Can you explain what is the expected number of context switches.

Just for everyone's info, the private messaging system is not working.  I received an email notification that a message was available, but I can't read it on IDZ and I can't send a private message.  IDZ support has been notified.

WRT to this post, LIU Q, what method did you or others use to measure the context switches that you think disagrees with VTune Amplifier XE?


@LIU Q.:

I can't respond via PM.  Please just post here.

Are you comparing context switches counted by VTune Amplifier XE to another tool or are you saying the number of context switches in the Top Down view don't match the Bottom Up view?

I was notified by @LIU Q that "true" number of context switches is 187775. Seems very strange.

Yes, but where did that "true" number come from?  And, why does s/he think it is "true"?

That is, what tool measured it and how does that tool measure context switches?

BTW, are you talking about Windows* or Linux* in this case?


I do not know which tool was used to get those numbers. It is also unclear which OS is used for that test.

Unfortunately @LIU Q did not respond to my private message where I asked him those questions.


Leave a Comment

Please sign in to add a comment. Not a member? Join today