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

How Vtune categorize kthreads

jing
Novice
1,341 Views

Hi,

I was wondering how vtune deal with kthreads? If I generate a vtune profiling report(like group-by module) on program using kthreads, will the part of kthread be categorized as the original application, as part of the kernel, or other modules? 

(a little bit more of background: I am currently using vtune to profile a SGX program, and the profiling result shows that isgx module only occupy 1% of the runtime. I noticed that sgx driver use kthread to deal with paging, so I was wondering if this will cause some of the runtime which actually belongs to sgx driver categorized as kernel?)

Thanks so much!

0 Kudos
1 Solution
DMITRY_T_Intel
Employee
1,316 Views

Hello jing!

For successful profiling kernel modules several prerequisites shall be done:
1. Enable kernel modules resolution
2. Download and install available debug kernel versions
3. Build the Linux kernel with debug information
Please read details about these steps in the article from the VTune Profiler User Guide: https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/enabling-linux-kernel-analysis.html#enabling-linux-kernel-analysis_GUID-1E04AF16-30B8-4FAE-B551-EEABEB45ADE7
After the steps are done you will be able to profile Linux kernel and other system modules using VTune Profiler.

Hope this helps,
Dmitry

View solution in original post

0 Kudos
5 Replies
DMITRY_T_Intel
Employee
1,317 Views

Hello jing!

For successful profiling kernel modules several prerequisites shall be done:
1. Enable kernel modules resolution
2. Download and install available debug kernel versions
3. Build the Linux kernel with debug information
Please read details about these steps in the article from the VTune Profiler User Guide: https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/enabling-linux-kernel-analysis.html#enabling-linux-kernel-analysis_GUID-1E04AF16-30B8-4FAE-B551-EEABEB45ADE7
After the steps are done you will be able to profile Linux kernel and other system modules using VTune Profiler.

Hope this helps,
Dmitry

0 Kudos
DMITRY_T_Intel
Employee
1,242 Views

Hello jing!

I hope your issue is resolved. Could you please confirm whether we can close this thread?

Thanks.

0 Kudos
Dmitry_P_Intel1
Employee
1,232 Views

Hello,

CPU samples related to kthreads should be associated with vmlinux module. If you do hotspots collection with stacks based on HW sampling you can use e.g. Caller/Callee view to see total time for sgx functions and the functions they call in the kernel.

Thanks & Regards, Dmitry

 

0 Kudos
DMITRY_T_Intel
Employee
1,178 Views

Hello jing!

I hope your issue is resolved. Could you please confirm whether we can close this thread?

Thanks.

0 Kudos
DMITRY_T_Intel
Employee
1,151 Views

Hello jing!

We won't be monitoring this thread anymore. Kindly raise a new thread if you need further assistance. 

Thanks.


0 Kudos
Reply