linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* frame-pointer based user stack unwinding with perf on arm32
@ 2016-11-14 13:14 Milian Wolff
  2016-11-14 23:45 ` Kim Phillips
  0 siblings, 1 reply; 2+ messages in thread
From: Milian Wolff @ 2016-11-14 13:14 UTC (permalink / raw)
  To: perf group

[-- Attachment #1: Type: text/plain, Size: 2251 bytes --]

Hey all,

in principle, from what I understand and read on various places on the 
internet, it should be possible to unwind user stacks with perf using frame 
pointers on arm32 platform. See e.g.:

http://lxr.free-electrons.com/source/arch/arm/kernel/perf_callchain.c?
v=4.1#L62

Today, I tried this again, and could not make it work.

I used the stress_bt test application [1], and compiled it with various 
combinations of

-fno-omit-frame-pointer
-mapcs-frame
-mtpcs-frame
-funwind-tables
-fasynchronous-unwind-tables

[1]: https://wiki.linaro.org/LEG/Engineering/TOOLS/perf-callstack-unwinding#Backtrace_stress_application

None of these produced the desired results when running `perf record -g` on 
the target platform (a panda board):

root@arm:~# perf record -g ./stress_bt
Total count: 171711327751528502
root@arm:~# perf script 
<snip>
...
stress_bt   825  7645.3346298627:    8241360 cycles:ppp: 
                     5a0 foo_128+0xfffe0084 (/root/stress_bt)

stress_bt   825  7645.3346305738:    7932022 cycles:ppp: 
                     592 foo_128+0xfffe0076 (/root/stress_bt)
...
root@arm:~# uname -a
Linux arm 4.1.30-armv7-x7 #1 SMP Thu Aug 11 17:44:31 CEST 2016 armv7l GNU/
Linux
root@arm:~# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 10 (v7l)
BogoMIPS        : 698.80
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 10

processor       : 1
model name      : ARMv7 Processor rev 10 (v7l)
BogoMIPS        : 698.80
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 10

Hardware        : Generic OMAP4 (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000

Doing the same on an aarch64 platform, frame pointers seem to work as 
intended.

So, can someone please clarify whether this should also work on arm32? What 
are the requirements?

Thanks

-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-14 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 13:14 frame-pointer based user stack unwinding with perf on arm32 Milian Wolff
2016-11-14 23:45 ` Kim Phillips

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).