[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBQJZNFC3cnXWz1ycnFDKqY6j9QeoMnq_zxH138e2Tt6kQ@mail.gmail.com>
Date: Mon, 12 Dec 2011 22:45:58 -0800
From: Stephane Eranian <eranian@...gle.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, acme@...radead.org,
robert.richter@....com, ming.m.lin@...el.com, andi@...stfloor.org,
asharma@...com
Subject: Re: [PATCH 2/4] perf_event: add PERF_COUNT_HW_REF_CPU_CYCLES generic
PMU event
On Mon, Dec 12, 2011 at 9:32 AM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Peter Zijlstra <peterz@...radead.org> wrote:
>
>> On Sun, 2011-12-11 at 00:28 +0100, Stephane Eranian wrote:
>> > This event counts the number of reference core cpu cycles.
>> > Reference means that the event increments at a constant rate which
>> > is not subject to core CPU frequency adjustments. The event may
>> > not count when the processor is in halted (low power) state.
>> > As such, it may not be equivalent to wall clock time. However,
>> > when the processor is not halted state, the event keeps
>> > a constant correlation with wall clock time.
>> >
>> > Signed-off-by: Stephane Eranian <eranian@...gle.com>
>> > ---
>> > include/linux/perf_event.h | 1 +
>> > 1 files changed, 1 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
>> > index 564769c..0885561 100644
>> > --- a/include/linux/perf_event.h
>> > +++ b/include/linux/perf_event.h
>> > @@ -54,6 +54,7 @@ enum perf_hw_id {
>> > PERF_COUNT_HW_BUS_CYCLES = 6,
>> > PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
>> > PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
>> > + PERF_COUNT_HW_REF_CPU_CYCLES = 9,
>> >
>> > PERF_COUNT_HW_MAX, /* non-ABI */
>> > };
>>
>> Does it make sense to add this to the 'generic' events? Are
>> other archs going to use this?
>>
>> That is, I already queued patch 1, I'm just wondering if the
>> generic bit makes sense, Even BUS_CYCLES seems to be a
>> questionable 'generic' event, but that's history and we can't
>> fix it.
>
> If we named it in a generic way, with a generic,
> platform-independent meaning behind it, then it shouldn't be a
> problem. This is why i suggested naming it 'constant CPU cycles'
> - or 'constant freq cycles' or a variant of that.
>
Isn't CPU_REF_CYCLES good enough?
Should we speel out ref completely to 'REFERENCE'.
In the changelog, I gave a generic definition of what it is supposed to
measure. If most platforms don't have such events, then that's fine too.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists