Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
4554 Discussions

How Vtune categorize kthreads

jing
Novice
475 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
450 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-ta...
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

5 Replies
DMITRY_T_Intel
Employee
451 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-ta...
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

DMITRY_T_Intel
Employee
376 Views

Hello jing!

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

Thanks.

Dmitry_P_Intel1
Employee
366 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

 

DMITRY_T_Intel
Employee
312 Views

Hello jing!

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

Thanks.

DMITRY_T_Intel
Employee
285 Views

Hello jing!

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

Thanks.


Reply