I'm running "perf" in the following way:
perf record -a --call-graph -p some_pid perf report --call-graph --stdio
Then, I see this:
1.60% my_binary my_binary [.] my_func | --- my_func | |--71.10%-- (nil) | (nil) | --28.90%-- 0x17f310000000a
I can't see which functions call my_func(). I see "nil" and "0x17f310000000a" instead. Am I doing something wrong? It is probably not a debug info problem because some symbols are shown while others are not shown.
More info:
There is builtin perf. data parser and printer in perf tool of linux tools with subcommand "script". perf-script - Read perf. data (created by perf record) and display trace output This command reads the input file and displays the trace recorded.
Overhead: the percentage of overall samples collected in the corresponding function. Command: the command to which the samples belong. Shared object: the name of the image from where the samples came. Symbol: the symbol name which constitutes the sample, and the privilege level at which the sample was taken.
The perf command is used as a primary interface to the Linux kernel performance monitoring capabilities and can record CPU performance counters and trace points.
DESCRIPTION top. This perf script option is used to process perf script data using perf's built-in Python interpreter. It reads and processes the input file and displays the results of the trace analysis implemented in the given Python script, if any.
Make sure you compiled the code with -fno-omit-frame-pointer
gcc option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With