Skip to contentSkip to conversation

parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT

PATCH Applied Helge Deller 2 participants 2 messages Feb 6, 2009 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT

arch/parisc/Kconfig +6 -0
index aacf11d..4866e2f 100644
@@ -75,6 +75,9 @@ config GENERIC_HARDIRQS
 config GENERIC_IRQ_PROBE
 	def_bool y
 
+config HAVE_LATENCYTOP_SUPPORT
+        def_bool y
+
 config IRQ_PER_CPU
 	bool
 	default y
@@ -83,6 +86,9 @@ config IRQ_PER_CPU
 config PM
 	bool
 
+config STACKTRACE_SUPPORT
+	def_bool y
+
 config ISA_DMA_API
 	bool
 
arch/parisc/kernel/Makefile +1 -0
index 016d3fc..a7ba8cd 100644
@@ -16,5 +16,6 @@ obj-$(CONFIG_PA11)	+= pci-dma.o
 obj-$(CONFIG_PCI)	+= pci.o
 obj-$(CONFIG_MODULES)	+= module.o
 obj-$(CONFIG_64BIT)	+= binfmt_elf32.o sys_parisc32.o signal32.o
+obj-$(CONFIG_STACKTRACE)+= stacktrace.o
 # only supported for PCX-W/U in 64-bit mode at the moment
 obj-$(CONFIG_64BIT)	+= perf.o perf_asm.o
arch/parisc/kernel/stacktrace.c renamed from arch/parisc/kernel/stacktrace.c.org +63 -0

63 lines not on this page · raw message

#1 lore raw
Quoted 11 lines · Helge Deller
arch/parisc/kernel/stacktrace.c renamed from arch/parisc/kernel/stacktrace.c.org +11 -0
+#include <asm/unwind.h>
+
+static void dump_trace(struct task_struct *task, struct stack_trace *trace)
+{
+	struct unwind_frame_info info;
+
+	/* initialize unwind info */
+	if (task == current) {
+		unsigned long sp;
+		struct pt_regs r;
+HERE:

arch/parisc/kernel/stacktrace.c line 33

Quoted 10 lines
arch/parisc/kernel/stacktrace.c renamed from arch/parisc/kernel/stacktrace.c.org +10 -0
+		asm volatile ("copy %%r30, %0" : "=r"(sp));
+		memset(&r, 0, sizeof(struct pt_regs));
+		r.iaoq[0] = (unsigned long)&&HERE;
+		r.gr[2] = (unsigned long)__builtin_return_address(0);
+		r.gr[30] = sp;
+		unwind_frame_init(&info, task, &r);
+	} else {
+		unwind_frame_init_from_blocked_task(&info, task);
+	}
+

applied, with a clean up that takes this to a forced inline to share between here and traps.c.

cheers, Kyle