Skip to contentSkip to conversation

MIPS: Add user stack and registers to perf.

PATCH New David Daney 1 participant 1 message May 16, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Add user stack and registers to perf.

From: David Daney <[email protected]>

This allows for extracting off-line stack traces from user-space code in the perf tool.

---
 arch/mips/Kconfig                      |  2 ++
 arch/mips/include/uapi/asm/perf_regs.h | 41 +++++++++++++++++++++++
 arch/mips/kernel/Makefile              |  2 +-
 arch/mips/kernel/perf_regs.c           | 60 ++++++++++++++++++++++++++++++++++
 4 files changed, 104 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/include/uapi/asm/perf_regs.h
 create mode 100644 arch/mips/kernel/perf_regs.c
arch/mips/Kconfig +2 -0
index 7a58ab9..2ae8e1d 100644
@@ -5,6 +5,8 @@ config MIPS
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	select HAVE_PERF_EVENTS
+	select HAVE_PERF_REGS
+	select HAVE_PERF_USER_STACK_DUMP
 	select PERF_USE_VMALLOC
 	select HAVE_ARCH_KGDB
 	select ARCH_HAVE_CUSTOM_GPIO_H
arch/mips/include/uapi/asm/perf_regs.h new file +41 -0

41 lines not on this page · raw message

arch/mips/kernel/Makefile +1 -1
index 6ad9e04..17c99d7 100644
@@ -91,7 +91,7 @@ CFLAGS_cpu-bugs64.o	= $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/n
 
 obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT)	+= 8250-platform.o
 
-obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o
+obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_regs.o
 obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_mipsxx.o
 
 obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
arch/mips/kernel/perf_regs.c new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
1.7.11.7