From: Baruch Even <baruch@ev-en.org>
To: li nux <lnxluv@yahoo.com>
Cc: linux <linux-kernel@vger.kernel.org>
Subject: Re: oprofile: enabling cpu events
Date: Sat, 07 May 2005 16:08:48 +0100 [thread overview]
Message-ID: <427CDA00.9040203@ev-en.org> (raw)
In-Reply-To: <20050507123956.53734.qmail@web60524.mail.yahoo.com>
[-- 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
next prev parent reply other threads:[~2005-05-07 15:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-07 12:39 oprofile: enabling cpu events li nux
2005-05-07 15:08 ` Baruch Even [this message]
2005-05-08 7:20 ` li nux
2005-05-08 12:29 ` Philippe Elie
2005-05-08 14:20 ` Baruch Even
-- strict thread matches above, loose matches on Subject: below --
2005-05-15 11:54 li nux
2005-05-15 13:35 ` John Levon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427CDA00.9040203@ev-en.org \
--to=baruch@ev-en.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lnxluv@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox