Re: oprofile: enabling cpu events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



li nux wrote:
I want to profile cpu events using oprofile, when i
issue following command, it gives me an error saying
that oprofile is in timer mode.
What does it mean ?
the link
http://oprofile.sourceforge.net/docs/intel-piii-events.php3
says event=CPU_CLK_UNHALTED is suppported for Pentium
II processor.

Is there any way i can enable cpu events ?

# opcontrol --setup  --event=CPU_CLK_UNHALTED
You cannot specify any performance counter events
because OProfile is in timer mode.

The code has some "protection" against too new processors, the kernel folks prefer that you use older CPUs, or use newer kernels.

The patch that worked for me against 2.6.6 is attached.

Baruch
 arch/i386/oprofile/nmi_int.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.6/arch/i386/oprofile/nmi_int.c
===================================================================
--- 2.6.6.orig/arch/i386/oprofile/nmi_int.c
+++ 2.6.6/arch/i386/oprofile/nmi_int.c
@@ -313,7 +313,7 @@ static int __init p4_init(void)
 {
 	__u8 cpu_model = current_cpu_data.x86_model;
 
-	if (cpu_model > 3)
+	if (cpu_model > 100)
 		return 0;
 
 #ifndef CONFIG_SMP

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux