Re: [PATCH V6 06/13] perf: Add Nehalem and Sandy Bridge uncore support

From: Yan, Zheng
Date: Mon Jun 18 2012 - 21:39:47 EST


On 06/18/2012 05:23 PM, Stephane Eranian wrote:
> On Sat, Jun 16, 2012 at 2:46 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
>> >
>> > On Fri, 2012-06-15 at 20:46 +0200, Stephane Eranian wrote:
>>> > > Yes, and let the parser be case insensitive.
>> >
>> > Right, I did the below on top..
>> >
>> > ---
>> > --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
>> > +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
>> > @@ -179,22 +179,17 @@ static struct attribute *snbep_uncore_pc
>> > };
>> >
>> > static struct uncore_event_desc snbep_uncore_imc_events[] = {
>> > - INTEL_UNCORE_EVENT_DESC(CLOCKTICKS, "config=0xffff"),
>> > - /* read */
>> > - INTEL_UNCORE_EVENT_DESC(CAS_COUNT_RD, "event=0x4,umask=0x3"),
>> > - /* write */
>> > - INTEL_UNCORE_EVENT_DESC(CAS_COUNT_WR, "event=0x4,umask=0xc"),
>> > + INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0xff");
> Just like for core, I would pick 0xff as the pseudo event code for
> fixed uncore events
> and use the umask value to determine which of the fixed events we want
> to map to. There
> is only one fixed counter so far. But more could be added later on, so
> why not start with
> umask=0x00 or umask=0x1 instead of umask=0xff?
>

Good idea. I think changing the definition of UNCORE_FIXED_EVENT to 0xff and
changing configure for the clockticks events to config=0xff are enough for now.

Regards
Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/