[PATCH 0/3] Add support for perf user stack dump in powerpc

From: Chandan Kumar
Date: Thu Apr 28 2016 - 05:31:09 EST


This patch set enables perf user stack dump on powerpc

Example with "ls" command as user program
./perf record --call-graph=dwarf,8192 ls

./perf script
---------8< -----
..
...
perf 12549 75938.934539: 1771 cycles:ppp:
210d90 .perf_event_exec (/boot/vmlinux)
34b914 .load_elf_binary (/boot/vmlinux)
2dcabc .search_binary_handler (/boot/vmlinux)
2dd6f0 .do_execveat_common.isra.28 (/boot/vmlinux)
2ddcd8 .sys_execve (/boot/vmlinux)
19258 system_call (/boot/vmlinux)

perf 12549 75938.934549: 8415 cycles:ppp:
207a88 .perf_event_aux_ctx (/boot/vmlinux)
0 [unknown] ([unknown])
214ab8 .perf_event_comm (/boot/vmlinux)
2dcfb8 .__set_task_comm (/boot/vmlinux)
2ddb44 .setup_new_exec (/boot/vmlinux)
34b914 .load_elf_binary (/boot/vmlinux)
2dcabc .search_binary_handler (/boot/vmlinux)
2dd6f0 .do_execveat_common.isra.28 (/boot/vmlinux)
2ddcd8 .sys_execve (/boot/vmlinux)
19258 system_call (/boot/vmlinux)

ls 12549 75938.934562: 33745 cycles:ppp:
ee570 .task_work_add (/boot/vmlinux)
0 [unknown] ([unknown])
2ce380 .filp_close (/boot/vmlinux)
2fc464 .do_close_on_exec (/boot/vmlinux)
2ddbd8 .setup_new_exec (/boot/vmlinux)
34b914 .load_elf_binary (/boot/vmlinux)
2dcabc .search_binary_handler (/boot/vmlinux)
2dd6f0 .do_execveat_common.isra.28 (/boot/vmlinux)
2ddcd8 .sys_execve (/boot/vmlinux)
19258 system_call (/boot/vmlinux)

ls 12549 75938.934587: 116078 cycles:ppp:
6ff94 .__clear_user (/boot/vmlinux)
944400 .padzero ([kernel.vmlinux].text.unlikely)
34bd28 .load_elf_binary (/boot/vmlinux)
2dcabc .search_binary_handler (/boot/vmlinux)
2dd6f0 .do_execveat_common.isra.28 (/boot/vmlinux)
2ddcd8 .sys_execve (/boot/vmlinux)
19258 system_call (/boot/vmlinux)
...
..
----- 8< -----

Chandan Kumar (2):
powerpc: Add HAVE_PERF_USER_STACK_DUMP support
powerpc/perf: Add support for unwinding perf-stackdump

Naveen N. Rao (1):
perf tools: Fix perf regs mask generation

.../features/perf/perf-regs/arch-support.txt | 2 +-
.../features/perf/perf-stackdump/arch-support.txt | 2 +-
arch/powerpc/Kconfig | 1 +
tools/perf/arch/powerpc/util/Build | 1 +
tools/perf/arch/powerpc/util/unwind-libunwind.c | 96 ++++++++++++++++++++++
tools/perf/config/Makefile | 1 +
tools/perf/util/perf_regs.c | 8 +-
7 files changed, 105 insertions(+), 6 deletions(-)
create mode 100644 tools/perf/arch/powerpc/util/unwind-libunwind.c

--
1.9.3