Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ulrich_Bortfeld
Beginner
81 Views

no source view for linux kernel module

I am profiling a Linux driver stack consisting of multiple kernel modules using the sampling collector. For some kernel modules, I am able to get an annotated source view. For other modules, I am only able to get the assembly view. I would like to know prevents VTune from providing an annotated source view. All kernel modules were compiled with gcc with the -g option.

0 Kudos
5 Replies
Peter_W_Intel
Employee
81 Views

In order to drill down to kernel modules, the user has to check below:

1) Compile modules with "-g" option

2) Kernel files are uncompressed

3) Associated modules are not stripped of symbols.

Regards, Peter

Ulrich_Bortfeld
Beginner
81 Views

I am currently not interested in kernel internals. My focus is on the kernel modules. The modules are compiled with -g and optimizations turned off. VTune seems to have trouble annotating the source code with the event counts for certain functions.

One example:

I have a function which appears to be a hotspot for store stalls. I select that function and clock on the "Display Sources" button. VTune opens a source window which does not contain the function in question.

Peter_W_Intel
Employee
81 Views

Thank you to clarify - this is not a hotspot report issue (you can see your interest of functions), is a source view issue.

1. You can use "nm" command to check if your module has debugging symbols, which contains your functions.

2.Is it possible that VTune can't find your source file?You canadd source directory by Window->Preferences->VTune Performance Analyzer->Directories->Context:(your project)->Show directories for: (Source files) ->Add->select source directories->OK.

Thus, VTune Analyzer will search source directories based on this setting.

If your problem still persists on, please reply this thread privately with attached .tb5 file, problematic module file, source files- we can investigate further. Or submit a ticket to https://premier.intel.com - if you already have registered the product.

Regards, Peter

Ulrich_Bortfeld
Beginner
81 Views

Peter,

is there a way to perform the same operation with vtl ? I tried the following comand today and got the error message below. I confirmed with nm that the module contains symbol info including the function in question.

Thanks, Ulrich

[root@test ~]# vtl view -code -mp /lib/modules/2.6.18-128.el5/extra -mn module_name -sf source-dir -fn some_func


VTune Performance Analyzer 9.1 for Linux* build 401
Copyright (C) 2000-2009 Intel Corporation. All rights reserved.

Fri Mar 12 09:16:30 2010 ERROR: [Source View] Internal error - Can't get module information.
An error occurred during this operation.

Peter_W_Intel
Employee
81 Views

Hi Ulrich,

Please submit a ticket to premier - I mentioned in last post. We need your .tb5 file, module, and source file. This way is very helpful to investigate your issue further, easier on communicating.

We discuss on this forum for general questions, if the issue is user's program specific - go premier. Thanks for your understandings:-)

Regards, Peter

Reply