I'm trying to gather some profiling data for my app and I run the perf tool and Flame Graphs for that.
I'm referring the instructions provided in this slideshare: https://www.slideshare.net/brendangregg/java-performance-analysis-on-linux-with-flame-graphs
Below are the commands that I'm running:
1. sudo perf record -F 997 -a -g
2. sudo perf script > out.stacks01
When I run the second command, it displays below messages:
Failed to open /tmp/perf-9931.map, continuing without symbols.
no symbols found in <some path>, maybe install a debug package?
I did some online browsing and tried installing the debug packages as as mentioned here: https://gist.github.com/NLKNguyen/2fd920e2a50fd4b9701f
However, when I run "sudo apt-get update", it eventually fails saying "Failed to fetch......"
Could anybody figure out what's going on here? What do I need to do in order to install the debug symbols package correctly?
EDIT: My key problem was that the flame graph I was generating didn't have Java symbols in it and hence I ended up focusing on above errors/messages. The below accepted answer provides a very good explanation for my original post. However, I was able to resolve my issue by running jmaps as shown below:
sudo perf record -F 997 -a -g -- sleep 300; jmaps
This is documented in instructions in the slide share link shared above.