brendangregg / FlameGraph

Stack trace visualizer
http://www.brendangregg.com/flamegraphs.html
17.22k stars 1.96k forks source link

Do we need vbox debuginfo fro the package #21

Open changyh opened 11 years ago

changyh commented 11 years ago

Hi Brendan,

I am running your script on centos6 and found the issues as the following.

Do I need Vbox debuginfo?I couldn't find el6 version,..

Thanks,

Y.H. Chang

[root@localhost FlameGraph]# perf script | ./stackcollapse-perf.pl > out.perf-folded no symbols found in /opt/VBoxGuestAdditions-4.2.4/sbin/VBoxService, maybe install a debug package? Failed to open /tmp/perf-13664.map, continuing without symbols Failed to open /tmp/perf-13644.map, continuing without symbols No kallsyms or vmlinux with build-id 109273b95e150142afb31a6b1ecd0053a6147f79 was found [vboxguest] with build id 109273b95e150142afb31a6b1ecd0053a6147f79 not found, continuing without symbols Failed to open /tmp/perf-13356.map, continuing without symbols

[root@localhost FlameGraph]

-rw-------. 1 root root 10080492 Apr 16 14:03 perf.data

rmatsubara commented 7 years ago

I am having the same problem on Oracle VMLinux ubuntu: Linux ubuntu-VirtualBox 3.2.0-126-generic-pae #169-Ubuntu SMP Fri Mar 31 14:43:09 UTC 2017 i686 i686 i386 GNU/Linux

Perf is looking for the map file in the wrong path: ubuntu@ubuntu-VirtualBox:~/perfTest$ sudo perf script > out.perf no symbols found in /opt/VBoxGuestAdditions-5.0.20/sbin/VBoxService, maybe install a debug package? Failed to open [vboxguest], continuing without symbols

The symbol is generated in the /tmp/perf-2373.map and owned by the root user. The file looks ok.

I have installed the debug package with: sudo apt install openjdk-8-dbg

However, I still have the error.

I am on ubuntu@ubuntu-VirtualBox:~$ sudo perf --version perf version 3.2.79

ubuntu@ubuntu-VirtualBox:~$ java -version openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-3~12.04-b14) OpenJDK Server VM (build 25.111-b14, mixed mode)

Why is perf looking for the symbol map file at /opt/VBoxGuestAdditions-5.0.20/sbin/VBoxService? I don't have any environment variable pointing to that file

Thanks

rmatsubara commented 7 years ago

Just for the record I found out what was the problem. When executing the sudo perf script, it was looking for a different pid that belonged to my Firefox.

So, instead of just doing the perf record sudo perf record -F 99 -a -g -- sleep 30 (that is for all process as stated in https://medium.com/netflix-techblog/java-in-flames-e763b3d32166)

I used the commando for my specific java application pid: sudo perf record -F 99 -a -g -p 2667 -- sleep 30

And that worked perfectly.

It is an amazing tool. Thanks