Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
4676 Discussions

Where do context switches come from?

Huang_J_
Beginner
121 Views

Hi, I'm trying to analyze which line of code the preemption context switches and synchronization context switches come from in my program using VTune 2013 update 17. I have no idea how to do it. Can anyone help me out? Many thanks.

0 Kudos
2 Replies
Bernard
Black Belt
121 Views

If I understood your  question correctly  Context Switches come from OS scheduler and its scheduling algorithms.

Vitaly_S_Intel
Employee
121 Views

Click on context switch in timeline, then choose metric (e.g. Context Switch Time) in stack pane and you'll see stack related to this context switch according to metric selected. You can now drill down to source or disasm double clicking to top stack frame.

Reply