diff options
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 3 | ||||
-rw-r--r-- | kernel/perf_event.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_event_perf.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 7645faea8e85..60398a0d947c 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1702,6 +1702,7 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
1702 | return entry; | 1702 | return entry; |
1703 | } | 1703 | } |
1704 | 1704 | ||
1705 | #ifdef CONFIG_EVENT_TRACING | ||
1705 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) | 1706 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) |
1706 | { | 1707 | { |
1707 | regs->ip = ip; | 1708 | regs->ip = ip; |
@@ -1713,4 +1714,4 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski | |||
1713 | regs->cs = __KERNEL_CS; | 1714 | regs->cs = __KERNEL_CS; |
1714 | local_save_flags(regs->flags); | 1715 | local_save_flags(regs->flags); |
1715 | } | 1716 | } |
1716 | EXPORT_SYMBOL_GPL(perf_arch_fetch_caller_regs); | 1717 | #endif |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index fb3031cf9f17..574ee58a3046 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2786,10 +2786,12 @@ __weak struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
2786 | return NULL; | 2786 | return NULL; |
2787 | } | 2787 | } |
2788 | 2788 | ||
2789 | #ifdef CONFIG_EVENT_TRACING | ||
2789 | __weak | 2790 | __weak |
2790 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) | 2791 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) |
2791 | { | 2792 | { |
2792 | } | 2793 | } |
2794 | #endif | ||
2793 | 2795 | ||
2794 | /* | 2796 | /* |
2795 | * Output | 2797 | * Output |
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c index 0709e4f75114..7d79a10c3cde 100644 --- a/kernel/trace/trace_event_perf.c +++ b/kernel/trace/trace_event_perf.c | |||
@@ -12,6 +12,8 @@ | |||
12 | DEFINE_PER_CPU(struct pt_regs, perf_trace_regs); | 12 | DEFINE_PER_CPU(struct pt_regs, perf_trace_regs); |
13 | EXPORT_PER_CPU_SYMBOL_GPL(perf_trace_regs); | 13 | EXPORT_PER_CPU_SYMBOL_GPL(perf_trace_regs); |
14 | 14 | ||
15 | EXPORT_SYMBOL_GPL(perf_arch_fetch_caller_regs); | ||
16 | |||
15 | static char *perf_trace_buf; | 17 | static char *perf_trace_buf; |
16 | static char *perf_trace_buf_nmi; | 18 | static char *perf_trace_buf_nmi; |
17 | 19 | ||