[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111211080138.GB20790@elte.hu>
Date: Sun, 11 Dec 2011 09:01:38 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.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
* Stephane Eranian <eranian@...gle.com> 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,
Btw., that was what 'bus cycles' tried to do a long time ago:
the constant, non-variable baseline heartbeat of the system.
We could simply rename that, fix the event tables where needed,
and keep the ABI.
Just a small detail: how about naming it 'constant [frequency]
CPU cycles'? That's a concept that might be present on other
platforms as well.
CONST_FREQ_CYCLES or so. The 'CPU' can be dropped as well
because it's not really the CPU's frequency anymore.
Thanks,
Ingo
--
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