Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
4682 Discussions

Resolving kernel symbols with Xeon Phi and MPSS 3.1.2

Tim_C_
Beginner
150 Views

I'm trying to understand why an application is spending lots of time in [vmlinux], but I can't get VTune to resolve the MIC's kernel. I have found some suggestions (http://software.intel.com/en-us/forums/topic/387212) to tell amplxe-cl to search /lib/firmware/mic to resolve kernel symbols, but this directory doesn't exist anymore. (I imagine it did with earlier versions of the MIC tools.)

I'm currently running amplxe-cl like so:

amplxe-cl -collect knc-hotspots -search-dir all:rp=/usr/share/mpss/firmware -- ssh mic0 naughtyprogram

 

However, the search path I've given doesn't help amplxe-cl resolve symbols in vmlinux, since

amplxe-cl -report hotspots -filter module=vmlinux -r tmp

 

only yields:

[vmlinux]  vmlinux         40.703

 

I'm running MPSS 3.1.2, which seems to have moved a lot of things around. How can I help vtune resolve vmlinux symbols?

0 Kudos
1 Solution
robert-reed
Valued Contributor II
150 Views

Sorry.  I've been meaning to write something about the changes for MPSS 3, and I just haven't been able to find the time, so I'll make a little time right now.  Yes, the location for kernel symbols has changed with MPSS 3, and a little preparatory work may be needed.  The new path you should become familiar with for MPSS 3 is /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/ (substitute your MPSS version for the 3.1.2 string).  In that directory you should find a "boot" directory that will have a vmlinux image (mine is called vmlinux-2.6.38.8+mpss3.1.2, in keeping with being on MPSS 3.1.2).  You may need to add a symlink, vmlinux, pointing at that image:

$ ll
total 97280
-rw-r--r-- 1 root  2761952 Dec 18 19:17 bzImage-2.6.38.8+mpss3.1.2
lrwxrwxrwx 1 root       26 Jan 14 11:10 vmlinux -> vmlinux-2.6.38.8+mpss3.1.2
-rw-r--r-- 1 root 96739561 Dec 18 19:17 vmlinux-2.6.38.8+mpss3.1.2

VTune Amplifier looks for vmlinux.  If you add this path to the list within VTune Amplifier, it should be able to resolve MPSS 3 kernel symbols.  While you're there, you might also want to add /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/lib64 to your list of  binary symbol paths, to resolve libc and other such references.

I still want to write this up for general availability, but hopefully these details will be adequate for you to move on from where you're stuck.

View solution in original post

2 Replies
robert-reed
Valued Contributor II
151 Views

Sorry.  I've been meaning to write something about the changes for MPSS 3, and I just haven't been able to find the time, so I'll make a little time right now.  Yes, the location for kernel symbols has changed with MPSS 3, and a little preparatory work may be needed.  The new path you should become familiar with for MPSS 3 is /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/ (substitute your MPSS version for the 3.1.2 string).  In that directory you should find a "boot" directory that will have a vmlinux image (mine is called vmlinux-2.6.38.8+mpss3.1.2, in keeping with being on MPSS 3.1.2).  You may need to add a symlink, vmlinux, pointing at that image:

$ ll
total 97280
-rw-r--r-- 1 root  2761952 Dec 18 19:17 bzImage-2.6.38.8+mpss3.1.2
lrwxrwxrwx 1 root       26 Jan 14 11:10 vmlinux -> vmlinux-2.6.38.8+mpss3.1.2
-rw-r--r-- 1 root 96739561 Dec 18 19:17 vmlinux-2.6.38.8+mpss3.1.2

VTune Amplifier looks for vmlinux.  If you add this path to the list within VTune Amplifier, it should be able to resolve MPSS 3 kernel symbols.  While you're there, you might also want to add /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/lib64 to your list of  binary symbol paths, to resolve libc and other such references.

I still want to write this up for general availability, but hopefully these details will be adequate for you to move on from where you're stuck.

Tim_C_
Beginner
150 Views

Thanks! I've just created the symlink and pointed vtune in its direction and I'm in business now.

Reply