Skip to content

Commit fae00a6

Browse files
Jin Yaogregkh
authored andcommitted
perf pmu-events: Fix missing "cpu_clk_unhalted.core" event
[ Upstream commit 8e6e5be ] The events defined in pmu-events JSON are parsed and added into perf tool. For fixed counters, we handle the encodings between JSON and perf by using a static array fixed[]. But the fixed[] has missed an important event "cpu_clk_unhalted.core". For example, on the Tremont platform, [root@localhost ~]# perf stat -e cpu_clk_unhalted.core -a event syntax error: 'cpu_clk_unhalted.core' \___ parser error With this patch, the event cpu_clk_unhalted.core can be parsed. [root@localhost perf]# ./perf stat -e cpu_clk_unhalted.core -a -vvv ------------------------------------------------------------ perf_event_attr: type 4 size 112 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ ... Signed-off-by: Jin Yao <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 5db6357 commit fae00a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/pmu-events/jevents.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ static struct fixed {
346346
{ "inst_retired.any_p", "event=0xc0" },
347347
{ "cpu_clk_unhalted.ref", "event=0x0,umask=0x03" },
348348
{ "cpu_clk_unhalted.thread", "event=0x3c" },
349+
{ "cpu_clk_unhalted.core", "event=0x3c" },
349350
{ "cpu_clk_unhalted.thread_any", "event=0x3c,any=1" },
350351
{ NULL, NULL},
351352
};

0 commit comments

Comments
 (0)