diff options
author | Robert Richter <robert.richter@amd.com> | 2011-10-11 15:11:08 (GMT) |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2011-11-04 15:27:18 (GMT) |
commit | dcfce4a095932e6e95d83ad982be3609947963bc (patch) | |
tree | 2808b7cbdb57deab25cc1cd847fd0f9ffa058f92 /drivers/oprofile/oprof.h | |
parent | 75c43a20b220f885c39ffa7cdbbb1191e257a9a9 (diff) | |
download | linux-dcfce4a095932e6e95d83ad982be3609947963bc.tar.xz |
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 'drivers/oprofile/oprof.h')
-rw-r--r-- | drivers/oprofile/oprof.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h index 177b73d..769fb0f 100644 --- a/drivers/oprofile/oprof.h +++ b/drivers/oprofile/oprof.h @@ -36,6 +36,15 @@ struct dentry; void oprofile_create_files(struct super_block *sb, struct dentry *root); int oprofile_timer_init(struct oprofile_operations *ops); void oprofile_timer_exit(void); +#ifdef CONFIG_OPROFILE_NMI_TIMER +int op_nmi_timer_init(struct oprofile_operations *ops); +#else +static inline int op_nmi_timer_init(struct oprofile_operations *ops) +{ + return -ENODEV; +} +#endif + int oprofile_set_ulong(unsigned long *addr, unsigned long val); int oprofile_set_timeout(unsigned long time); |