linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: oprofile: enabling cpu events
@ 2005-05-15 11:54 li nux
  2005-05-15 13:35 ` John Levon
  0 siblings, 1 reply; 7+ messages in thread
From: li nux @ 2005-05-15 11:54 UTC (permalink / raw)
  To: Philippe Elie; +Cc: Baruch Even, linux

Thanks Philippe,
You are right, it seems that apci is off by default.
How to turn it on ?
the flags in /proc/cpuinfo does not show acpi
cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 5
model name      : Pentium II (Deschutes)
stepping        : 3
cpu MHz         : 450.008
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8
sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips        : 886.78

--- Philippe Elie <phil.el@wanadoo.fr> wrote:
> On Sun, 08 May 2005 at 00:20 +0000, li nux wrote:
> 
> > Thanks Baruch,
> > # opcontrol --setup  --event=CPU_CLK_UNHALTED
> >  You cannot specify any performance counter events
> >  because OProfile is in timer mode.
>  
> 
> check if local apic support is turned on.
> 
> Philippe Elie
> 



		
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: oprofile: enabling cpu events
  2005-05-15 11:54 oprofile: enabling cpu events li nux
@ 2005-05-15 13:35 ` John Levon
  0 siblings, 0 replies; 7+ messages in thread
From: John Levon @ 2005-05-15 13:35 UTC (permalink / raw)
  To: li nux; +Cc: Philippe Elie, Baruch Even, linux

On Sun, May 15, 2005 at 04:54:59AM -0700, li nux wrote:

> You are right, it seems that apci is off by default.
> How to turn it on ?

It's apic not acpi. Read the docs for your kernel version.

john

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: oprofile: enabling cpu events
  2005-05-08  7:20   ` li nux
  2005-05-08 12:29     ` Philippe Elie
@ 2005-05-08 14:20     ` Baruch Even
  1 sibling, 0 replies; 7+ messages in thread
From: Baruch Even @ 2005-05-08 14:20 UTC (permalink / raw)
  To: li nux; +Cc: linux

There should be a similar case there for PPro machines, and you might 
have something other than an Intel Xeon.

The best route to solve your problem is the oprofile irc channel, you 
can find its details in the oprofile website.

Baruch

li nux wrote:
> Thanks Baruch,
> But, I am still hitting the same issue.
> I am using SuSE 2.6.5, but oprofile code looks
> similar.
> so i manually made that small change from if
> (cpu_model > 3) to if (cpu_model > 100), and did a
> make modules and make modules_install.
> Then inserted the fresh oprofile module.
> # opcontrol --setup  --event=CPU_CLK_UNHALTED
>  You cannot specify any performance counter events
>  because OProfile is in timer mode.
> 
> --- Baruch Even <baruch@ev-en.org> wrote:
> 
>>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
>>
> 
> 
> 
> 
> 		
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: oprofile: enabling cpu events
  2005-05-08  7:20   ` li nux
@ 2005-05-08 12:29     ` Philippe Elie
  2005-05-08 14:20     ` Baruch Even
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Elie @ 2005-05-08 12:29 UTC (permalink / raw)
  To: li nux; +Cc: Baruch Even, linux

On Sun, 08 May 2005 at 00:20 +0000, li nux wrote:

> Thanks Baruch,
> But, I am still hitting the same issue.
> I am using SuSE 2.6.5, but oprofile code looks
> similar.
> so i manually made that small change from if
> (cpu_model > 3) to if (cpu_model > 100), and did a
> make modules and make modules_install.
> Then inserted the fresh oprofile module.
> # opcontrol --setup  --event=CPU_CLK_UNHALTED
>  You cannot specify any performance counter events
>  because OProfile is in timer mode.
 

check if local apic support is turned on.

Philippe Elie


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: oprofile: enabling cpu events
  2005-05-07 15:08 ` Baruch Even
@ 2005-05-08  7:20   ` li nux
  2005-05-08 12:29     ` Philippe Elie
  2005-05-08 14:20     ` Baruch Even
  0 siblings, 2 replies; 7+ messages in thread
From: li nux @ 2005-05-08  7:20 UTC (permalink / raw)
  To: Baruch Even; +Cc: linux

Thanks Baruch,
But, I am still hitting the same issue.
I am using SuSE 2.6.5, but oprofile code looks
similar.
so i manually made that small change from if
(cpu_model > 3) to if (cpu_model > 100), and did a
make modules and make modules_install.
Then inserted the fresh oprofile module.
# opcontrol --setup  --event=CPU_CLK_UNHALTED
 You cannot specify any performance counter events
 because OProfile is in timer mode.

--- Baruch Even <baruch@ev-en.org> wrote:
> 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
> 



		
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: oprofile: enabling cpu events
  2005-05-07 12:39 li nux
@ 2005-05-07 15:08 ` Baruch Even
  2005-05-08  7:20   ` li nux
  0 siblings, 1 reply; 7+ messages in thread
From: Baruch Even @ 2005-05-07 15:08 UTC (permalink / raw)
  To: li nux; +Cc: linux

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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

[-- Attachment #2: oprofile.patch --]
[-- Type: text/x-patch, Size: 465 bytes --]

 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* oprofile: enabling cpu events
@ 2005-05-07 12:39 li nux
  2005-05-07 15:08 ` Baruch Even
  0 siblings, 1 reply; 7+ messages in thread
From: li nux @ 2005-05-07 12:39 UTC (permalink / raw)
  To: linux

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.

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

-lnxluv





		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-15 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-15 11:54 oprofile: enabling cpu events li nux
2005-05-15 13:35 ` John Levon
  -- strict thread matches above, loose matches on Subject: below --
2005-05-07 12:39 li nux
2005-05-07 15:08 ` Baruch Even
2005-05-08  7:20   ` li nux
2005-05-08 12:29     ` Philippe Elie
2005-05-08 14:20     ` Baruch Even

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).