From: Stephane Eranian Date: Sat, 10 Dec 2011 23:28:54 +0000 (+0100) Subject: perf: Add support for PERF_HW_COUNT_REF_CPU_CYCLES X-Git-Tag: v3.3-rc1~51^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1ac18af219835fd5b8e19c14d2dd75c55f78737;p=platform%2Fupstream%2Fkernel-adaptation-pc.git perf: Add support for PERF_HW_COUNT_REF_CPU_CYCLES Add new generic hw event: ref-cycles, which maps to PERF_HW_COUNT_REF_CPUCYCLES: $ perf stat -e ref-cycles ls Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1323559734-3488-5-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 586ab3f..531c283 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -38,6 +38,7 @@ static struct event_symbol event_symbols[] = { { CHW(BRANCH_INSTRUCTIONS), "branch-instructions", "branches" }, { CHW(BRANCH_MISSES), "branch-misses", "" }, { CHW(BUS_CYCLES), "bus-cycles", "" }, + { CHW(REF_CPU_CYCLES), "ref-cycles", "" }, { CSW(CPU_CLOCK), "cpu-clock", "" }, { CSW(TASK_CLOCK), "task-clock", "" }, @@ -68,6 +69,7 @@ static const char *hw_event_names[PERF_COUNT_HW_MAX] = { "bus-cycles", "stalled-cycles-frontend", "stalled-cycles-backend", + "ref-cycles", }; static const char *sw_event_names[PERF_COUNT_SW_MAX] = {