mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, zheng.z.yan@linux.intel.com
Subject: Re: [PATCH] perf, x86: Fix Intel shared extra MSR allocation
Date: Wed, 06 Jun 2012 12:53:58 +0200	[thread overview]
Message-ID: <1338980038.2749.97.camel@twins> (raw)
In-Reply-To: <1338979012.2749.90.camel@twins>

On Wed, 2012-06-06 at 12:36 +0200, Peter Zijlstra wrote:
> On Wed, 2012-06-06 at 12:35 +0200, Stephane Eranian wrote:
> > Ok, I found the problem. It was in intel_fixup_er().
> > Unlike in the original code, this routine must update
> > the event->extra_reg.idx to the idx parameter instead
> > of trying to swap out from it. 
> 
> Ah indeed. Thanks!


static void intel_fixup_er(struct perf_event *event, int idx)
{
        event->hw.extra_reg.idx = idx;

        if (idx == EXTRA_REG_RSP_0) {
                event->hw.config &= ~INTEL_ARCH_EVENT_MASK;
                event->hw.config |= 0x01b7;
                event->hw.extra_reg.reg = MSR_OFFCORE_RSP_0;
        } else if (idx == EXTRA_REG_RSP_1) {
                event->hw.config &= ~INTEL_ARCH_EVENT_MASK;
                event->hw.config |= 0x01bb;
                event->hw.extra_reg.reg = MSR_OFFCORE_RSP_1;
        }
}

Like that then?

  reply	other threads:[~2012-06-06 10:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05 21:35 Stephane Eranian
2012-06-06 10:35 ` Stephane Eranian
2012-06-06 10:36   ` Peter Zijlstra
2012-06-06 10:53     ` Peter Zijlstra [this message]
2012-06-06 11:43       ` Stephane Eranian
2012-06-06 11:57       ` Stephane Eranian
2012-06-06 12:06         ` Peter Zijlstra
2012-06-06 12:08           ` Stephane Eranian
  -- strict thread matches above, loose matches on Subject: below --
2012-06-01  3:20 [PATCH] perf: Fix intel shared extra msr allocation Yan, Zheng
2012-06-01  9:35 ` Stephane Eranian
2012-06-01 14:11   ` Yan, Zheng
2012-06-05 10:14     ` Peter Zijlstra
2012-06-05 10:21       ` Stephane Eranian
2012-06-05 10:27         ` Peter Zijlstra
2012-06-05 10:38           ` Stephane Eranian
2012-06-05 12:07             ` Peter Zijlstra
2012-06-05 12:39               ` Peter Zijlstra
2012-06-05 12:51                 ` Stephane Eranian
2012-06-05 13:04                   ` Peter Zijlstra
2012-06-05 13:30                     ` [PATCH] perf, x86: Fix Intel shared extra MSR allocation Peter Zijlstra
2012-06-05 13:56                       ` Peter Zijlstra
2012-06-05 21:26                         ` Stephane Eranian
2012-06-06  1:00                         ` Yan, Zheng

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=1338980038.2749.97.camel@twins \
    --to=peterz@infradead.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zheng.z.yan@linux.intel.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

Powered by JetHome