linux - How can I get perf to find symbols in my program -
when using perf report, don't see symbols program, instead output this:
$ perf record /path/to/racket ints.rkt 10000 $ perf report --stdio # overhead command shared object symbol # ........ ........ ................. ...... # 70.06% ints.rkt [unknown] [.] 0x5f99b8 26.28% ints.rkt [kernel.kallsyms] [k] 0xffffffff8103d0ca 3.66% ints.rkt perf-32046.map [.] 0x7f1d9be46650 which uninformative.
the relevant program built debugging symbols, , sysprof tool shows appropriate symbols, zoom, think using perf under hood.
note on x86-64, binary compiled -fomit-frame-pointer, that's case when running under other tools well.
this post on year old, since came out @ top of google search results when had same problem, thought i'd answer here. after more searching around, found answer given in related stackoverflow question helpful. on ubuntu raring system, ended doing following:
- compile c++ sources
-g(fairly obvious, need debug symbols) run
perfasrecord -g dwarf -f 97 /path/to/my/programthis way
perfable handle dwarf 2 debug format, standard formatgccuses on linux.-f 97parameter reduces sampling rate 97 hz. default sampling rate apparently large system , resulted in messages this:warning: processed 172390 events , lost 126 chunks! check io/cpu overload!and
perf reportcall afterwards fail segmentation fault. reduced sampling rate worked out fine.- once
perf.datafile has been generated without errors in previous step, can runperf reportetc. flamegraph tools generate svg visualizations. other people reported running
echo 0 > /proc/sys/kernel/kptr_restrictas root can well, if kernel symbols required.
Comments
Post a Comment