From: Eric Dumazet <dada1@cosmosbay.com>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: Robert Richter <robert.richter@amd.com>,
Andi Kleen <andi@firstfloor.org>,
linux kernel <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: linux-2.6.28-rc2 regression : oprofile doesnt work anymore ?
Date: Tue, 04 Nov 2008 23:32:05 +0100 [thread overview]
Message-ID: <4910CD65.1010301@cosmosbay.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0811042118460.1597@melkki.cs.Helsinki.FI>
Pekka J Enberg a écrit :
> Hi Robert,
>
> On Tue, 4 Nov 2008, Robert Richter wrote:
>> your patchset breaks oprofile on Intel Core 2 cpus. I could bisect the
>> bug for c493756..5951290. Please take a look at this and send me a fix.
>
> Unfortunately I don't have my machine with me right now so I can't test
> this, but don't we want something like this? Andi?
Thanks a lot Pekka, this patch restores oprofile on my HP BL460c G1
Tested-by: Eric Dumazet <dada1@cosmosbay.com>
>
> Pekka
>
>>From 37d362c0262006be6a5d6a72b5993834afa776d7 Mon Sep 17 00:00:00 2001
> From: Pekka Enberg <penberg@cs.helsinki.fi>
> Date: Tue, 4 Nov 2008 21:17:47 +0200
> Subject: [PATCH] oprofile: make perfmon nethalem only
>
> Commit b99170288421c79f0c2efa8b33e26e65f4bb7fb8 ("oprofile: Implement Intel
> architectural perfmon support") added perfmon support to newer Intel CPUs
> (Core1+). The problem there is that it requires a patched oprofile userland to
> work properly.
>
> Fix that up by making oprofile perfmon support nethalem only.
>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
> arch/x86/oprofile/nmi_int.c | 7 +++++++
> arch/x86/oprofile/op_model_ppro.c | 4 +++-
> 2 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
> index 022cd41..1f4448e 100644
> --- a/arch/x86/oprofile/nmi_int.c
> +++ b/arch/x86/oprofile/nmi_int.c
> @@ -426,8 +426,15 @@ static int __init ppro_init(char **cpu_type)
>
> static int __init arch_perfmon_init(char **cpu_type)
> {
> + __u8 cpu_model = boot_cpu_data.x86_model;
> +
> if (!cpu_has_arch_perfmon)
> return 0;
> +
> + /* Nethalem only */
> + if (cpu_model != 26)
> + return 0;
> +
> *cpu_type = "i386/arch_perfmon";
> model = &op_arch_perfmon_spec;
> arch_perfmon_setup_counters();
> diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
> index 0620d6d..1c91ba2 100644
> --- a/arch/x86/oprofile/op_model_ppro.c
> +++ b/arch/x86/oprofile/op_model_ppro.c
> @@ -66,6 +66,7 @@ static void ppro_fill_in_addresses(struct op_msrs * const msrs)
>
> static void ppro_setup_ctrs(struct op_msrs const * const msrs)
> {
> + __u8 cpu_model = boot_cpu_data.x86_model;
> unsigned int low, high;
> int i;
>
> @@ -76,7 +77,8 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
> return;
> }
>
> - if (cpu_has_arch_perfmon) {
> + /* Nethalem only */
> + if (cpu_has_arch_perfmon && cpu_model == 26) {
> union cpuid10_eax eax;
> eax.full = cpuid_eax(0xa);
> if (counter_width < eax.split.bit_width)
next prev parent reply other threads:[~2008-11-04 22:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 18:01 linux-2.6.28-rc2 regression : oprofile doesnt work anymore ? Eric Dumazet
2008-10-31 14:21 ` Pekka Enberg
2008-11-04 18:18 ` Robert Richter
2008-11-04 19:19 ` Pekka J Enberg
2008-11-04 22:32 ` Eric Dumazet [this message]
2008-11-05 6:09 ` Eric Dumazet
2008-11-06 15:00 ` Eric Dumazet
2008-11-07 13:02 ` Andi Kleen
2008-11-07 15:13 ` Eric Dumazet
2008-11-07 16:05 ` Andi Kleen
2008-11-07 16:12 ` Eric Dumazet
2008-11-07 16:47 ` Andi Kleen
2008-11-07 16:51 ` Eric Dumazet
2008-11-07 16:26 ` Robert Richter
2008-11-04 22:58 ` Andi Kleen
2008-11-04 20:09 ` Andi Kleen
2008-10-31 16:08 ` Jesper Dangaard Brouer
2008-11-01 2:29 ` Robert Richter
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=4910CD65.1010301@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@cs.helsinki.fi \
--cc=robert.richter@amd.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