Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

how Intel® VTune™ Profiler counts counter value and samples information about a given process.

yao__cody
Beginner
786 Views

Dear all,

As we know, each core has private registers(general and fixed counter), when the process switches to another CPU, we need to re-enable counter above the current CPU.
In Linux code, the context switch does this. However, in vtune driver(sepdk), I don’t have seen anything like this, so I was wondering how vtune driver did it.

If anyone knows, please help to explain it~

Thanks

cody

 

 

0 Kudos
1 Solution
Dmitry_R_Intel1
Employee
786 Views

The sepdk contains 2 different drivers actually. The sep driver doesn't handle context switches at all. Basically it always collects data system-wide (per-core).

The second driver called vtss (which is usually used when you select collection with stacks) does intercept context switches and behaves in a way similar to Linux perf in per-process mode. 

View solution in original post

0 Kudos
5 Replies
ArunJ_Intel
Moderator
786 Views

Hi Cody,

 

Thanks for reaching out to us. As this is an involved query regarding the internals of vtune . We are forwarding your case to SME.

 

 

Arun Jose

0 Kudos
Dmitry_R_Intel1
Employee
787 Views

The sepdk contains 2 different drivers actually. The sep driver doesn't handle context switches at all. Basically it always collects data system-wide (per-core).

The second driver called vtss (which is usually used when you select collection with stacks) does intercept context switches and behaves in a way similar to Linux perf in per-process mode. 

0 Kudos
yao__cody
Beginner
786 Views
Hi Dmitry, I got it. Thanks~
0 Kudos
yao__cody
Beginner
786 Views

Dmitry Ryabtsev (Intel) wrote:

The sepdk contains 2 different drivers actually. The sep driver doesn't handle context switches at all. Basically it always collects data system-wide (per-core).

The second driver called vtss (which is usually used when you select collection with stacks) does intercept context switches and behaves in a way similar to Linux perf in per-process mode. 

 

Hi Dmitry,

I tried it on my system, and used the following command:

1.vtune -collect-with runsa -knob event-config=INST_RETIRED.ANY -knob enable-driverless-collection=false ls

2.vtune -collect hotspots -knob sampling-mode=hw ls

But the result indicated that the collector type is always driverless perf per-process sampling. What circumstances Vtune sampling driver would be used.

My platform information:

Name:intel(R) Processor code named Skylake

Frequency:3.504HZ

Logical CPU count:4

kernel version 5.4.0

Thanks

cody

0 Kudos
Dmitry_R_Intel1
Employee
786 Views

Please check that VTune driver is installed and has correct permissions. See this article for more details: https://software.intel.com/en-us/vtune-help-building-and-installing-the-sampling-drivers-for-linux-targets

 

0 Kudos
Reply