Commit 8d26487fd4ddda7a0237da418fb8669fb06ae557

Authored by Török Edwin
Committed by Ingo Molnar
1 parent cffa10aecb

tracing/stack-tracer: introduce CONFIG_USER_STACKTRACE_SUPPORT

Impact: cleanup

User stack tracing is just implemented for x86, but it is not x86 specific.

Introduce a generic config flag, that is currently enabled only for x86.
When other arches implement it, they will have to
SELECT USER_STACKTRACE_SUPPORT.

Signed-off-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 3 changed files with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -36,6 +36,7 @@
36 36 select HAVE_ARCH_TRACEHOOK
37 37 select HAVE_GENERIC_DMA_COHERENT if X86_32
38 38 select HAVE_EFFICIENT_UNALIGNED_ACCESS
  39 + select USER_STACKTRACE_SUPPORT
39 40  
40 41 config ARCH_DEFCONFIG
41 42 string
include/linux/stacktrace.h
... ... @@ -16,7 +16,7 @@
16 16  
17 17 extern void print_stack_trace(struct stack_trace *trace, int spaces);
18 18  
19   -#ifdef CONFIG_X86
  19 +#ifdef CONFIG_USER_STACKTRACE_SUPPORT
20 20 extern void save_stack_trace_user(struct stack_trace *trace);
21 21 #else
22 22 # define save_stack_trace_user(trace) do { } while (0)
kernel/trace/Kconfig
... ... @@ -3,6 +3,9 @@
3 3 # select HAVE_FUNCTION_TRACER:
4 4 #
5 5  
  6 +config USER_STACKTRACE_SUPPORT
  7 + bool
  8 +
6 9 config NOP_TRACER
7 10 bool
8 11