resolving linux kernel addresses

resolving linux kernel addresses

Hello,

I am trying to profile an application using VTune Amplifier (downloaded a few days ago, evaluating period). VTune shows that most of the time is spent "[Outside any known module]". By switching to "Module/Code Location/Call Stack" in the "Bottom-up" tab I can see that the virtual addresses belong to the kernel, but I would like to see the addresses resolved.

Please note that I have already googled for answers, but nothing worked. Maybe useful info:

- I am using Ubuntu 13.10, kernel vmlinuz-3.11.0-15-generic;

- I have downloaded the Ubuntu-provided uncompressed kernel image with debug info. It is in /usr/lib/debug/boot/vmlinux-3.11.0-15-generic;

- I have added a symbolic link /usr/lib/debug/boot/vmlinux to the above file, just in case.

- I have added /usr/lib/debug/boot to the "Search Directories" in "Project Properties->Binary/Symbol Search";

- I am able to resolve the addresses shown by VTune by using "addr2line -e /usr/lib/debug/boot/vmlinux-3.11.0-15-generic".

I am doing something wrong, but I am stuck. Any help would be appreciated.

7 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi:

Usually, addresses within a *known* module but without symbol information are shown as "[modulename]", for example, you should have seen "[vmlinux]".  The fact that it says "[Outside any known module]" indicates more basic information is missing. What kind of platform is it?  Is it a tablet or some other mobile/handheld device?

Regards,
MrAnderson

No, it is just a PC, with an i7-3930K CPU at 3.2GHz and a standard Ubuntu installation. Is there anything that I can check?
 

Ah!  So, it may be that 13.10 is not supported yet.  Reviewing the release notes shows "Ubuntu* 10.04, 11.04, 11.10, 12.04 and 13.04" are supported by the latest release, Update 14.  Let me see what I can find out.

Regards,
MrAnderson

Hi Giuseppe:

This is working for us.  Can you tell me:

  1. What analysis type did you use?
  2. Are you running as root or non-root?
  3. if advanced hotspots, did you include stacks?  Call counts?

Thanks.

Regards,
MrAnderson

Ah, okay.  It seems to be a limitation due to your kernel configuration.  As root, execute the command:

$ cat /proc/sys/kernel/kptr_restrict

If the value is non-zero, then execute:

$ echo "0" > /proc/sys/kernel/kptr_restrict

and try collecting results, again.

See Release Note #200311949.

Regards,
MrAnderson

Now it really works, and it is great! Thank you very much for the prompt replies.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen