Re: Inlined functions in perf report

From: Jin, Yao
Date: Wed Dec 21 2016 - 17:57:53 EST


Could you see the inline if you use the addr2line command? For example, addr2line -e <app> -i <addr>

For example, in my case,

root@skl:/home/jinyao/skl-ws/perf-dev/lck-2867/test# addr2line -e ./test2 -i 40052d
/usr/include/x86_64-linux-gnu/bits/stdio2.h:104
/home/jinyao/skl-ws/perf-dev/lck-2867/test/test2.c:27
/home/jinyao/skl-ws/perf-dev/lck-2867/test/test2.c:35
/home/jinyao/skl-ws/perf-dev/lck-2867/test/test2.c:45
/home/jinyao/skl-ws/perf-dev/lck-2867/test/test2.c:61

00000000004004f0 <main>:

......

40052d: e8 6e ff ff ff callq 4004a0 <puts@plt>

Thanks

Jin Yao


On 12/21/2016 6:20 PM, Steinar H. Gunderson wrote:
On Wed, Dec 21, 2016 at 11:09:42AM +0100, Milian Wolff wrote:
Just to check - did you really compile your code with frame pointers? By
default, that is not the case, and the above will try to do frame pointer
unwinding which will then fail. Put differently - do you any stack frames at
all? Can you try `perf record --call-graph dwarf` instead? Of course, make
sure you compile your code with `-g -O2` or similar.
I don't specifically use -fno-omit-frame-pointer, no. But the normal stack
unwinding works just fine with mainline perf nevertheless; is this expected?

/* Steinar */