How do I detect the cpu migrations of a program by VTune?
You can use the Timeline Grouping to group by "Thread / H/W Context". This will show which core the thread ran on at various times.
View solution in original post
I'm not sure how you can use VTune to do that, but you can use Linux Perf (assuming you are using Linux):
perf stat -e cpu-migrations -- /path/to/your/program
For more complete information about compiler optimizations, see our Optimization Notice.