aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2011-10-11 11:11:08 -0400
committerRobert Richter <robert.richter@amd.com>2011-11-04 11:27:18 -0400
commitdcfce4a095932e6e95d83ad982be3609947963bc (patch)
tree2808b7cbdb57deab25cc1cd847fd0f9ffa058f92 /kernel/events
parent75c43a20b220f885c39ffa7cdbbb1191e257a9a9 (diff)
oprofile, x86: Reimplement nmi timer mode using perf event
The legacy x86 nmi watchdog code was removed with the implementation of the perf based nmi watchdog. This broke Oprofile's nmi timer mode. To run nmi timer mode we relied on a continuous ticking nmi source which the nmi watchdog provided. The nmi tick was no longer available and current watchdog can not be used anymore since it runs with very long periods in the range of seconds. This patch reimplements the nmi timer mode using a perf counter nmi source. V2: * removing pr_info() * fix undefined reference to `__udivdi3' for 32 bit build * fix section mismatch of .cpuinit.data:nmi_timer_cpu_nb * removed nmi timer setup in arch/x86 * implemented function stubs for op_nmi_init/exit() * made code more readable in oprofile_init() V3: * fix architectural initialization in oprofile_init() * fix CONFIG_OPROFILE_NMI_TIMER dependencies Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index d1a1bee35228..d2e28bdd523a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1322,6 +1322,7 @@ retry:
1322 } 1322 }
1323 raw_spin_unlock_irq(&ctx->lock); 1323 raw_spin_unlock_irq(&ctx->lock);
1324} 1324}
1325EXPORT_SYMBOL_GPL(perf_event_disable);
1325 1326
1326static void perf_set_shadow_time(struct perf_event *event, 1327static void perf_set_shadow_time(struct perf_event *event,
1327 struct perf_event_context *ctx, 1328 struct perf_event_context *ctx,
@@ -1806,6 +1807,7 @@ retry:
1806out: 1807out:
1807 raw_spin_unlock_irq(&ctx->lock); 1808 raw_spin_unlock_irq(&ctx->lock);
1808} 1809}
1810EXPORT_SYMBOL_GPL(perf_event_enable);
1809 1811
1810int perf_event_refresh(struct perf_event *event, int refresh) 1812int perf_event_refresh(struct perf_event *event, int refresh)
1811{ 1813{