Skip to contentSkip to conversation

oprofile: add a warning for unsuppored CPUs

PATCH New Peter Kjellstrom 1 participant 1 message Nov 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oprofile: add a warning for unsuppored CPUs

From: Peter Kjellstrom <[email protected]>

Oprofile first tries to setup hardware counter based profiling. If this fails it falls back to timer mode without any clues as to what went wrong. This patch adds a warning when no supported CPU is found (typically too new CPU and/or too old kernel).

---

arch/i386/oprofile/init.c +2 -0
@@ -29,6 +29,8 @@ int __init oprofile_arch_init(struct opr
 
 #ifdef CONFIG_X86_LOCAL_APIC
        ret = op_nmi_init(ops);
+       if (ret == -ENODEV)
+               printk(KERN_INFO "oprofile: hardware counters unavailable, unknown cpu.\n");
 #endif
 #ifdef CONFIG_X86_IO_APIC
        if (ret < 0)