diff options
-rw-r--r-- | xen/arch/x86/oprofile/nmi_int.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c index d05d7a360c..07050457f3 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -344,11 +344,26 @@ static int __init p4_init(char ** cpu_type) } +static int force_arch_perfmon; +static int force_cpu_type(const char *str) +{ + if (!strcmp(str, "arch_perfmon")) { + force_arch_perfmon = 1; + printk(KERN_INFO "oprofile: forcing architectural perfmon\n"); + } + + return 0; +} +custom_param("cpu_type", force_cpu_type); + extern int ppro_has_global_ctrl; static int __init ppro_init(char ** cpu_type) { __u8 cpu_model = current_cpu_data.x86_model; + if (force_arch_perfmon && cpu_has_arch_perfmon) + return 0; + switch (cpu_model) { case 0 ... 2: *cpu_type = "i386/ppro"; |