Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf jevents: Fix period for Intel fixed counters

The Intel fixed counters use a special table to override the JSON
information.

During this override the period information from the JSON file got
dropped, which results in inst_retired.any and similar running with
frequency mode instead of a period.

Just specify the expected period in the table.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20190927233546.11533-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Andi Kleen and committed by
Arnaldo Carvalho de Melo
6bdfd9f1 e98df280

+6 -6
+6 -6
tools/perf/pmu-events/jevents.c
··· 450 450 const char *name; 451 451 const char *event; 452 452 } fixed[] = { 453 - { "inst_retired.any", "event=0xc0" }, 454 - { "inst_retired.any_p", "event=0xc0" }, 455 - { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03" }, 456 - { "cpu_clk_unhalted.thread", "event=0x3c" }, 457 - { "cpu_clk_unhalted.core", "event=0x3c" }, 458 - { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1" }, 453 + { "inst_retired.any", "event=0xc0,period=2000003" }, 454 + { "inst_retired.any_p", "event=0xc0,period=2000003" }, 455 + { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03,period=2000003" }, 456 + { "cpu_clk_unhalted.thread", "event=0x3c,period=2000003" }, 457 + { "cpu_clk_unhalted.core", "event=0x3c,period=2000003" }, 458 + { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1,period=2000003" }, 459 459 { NULL, NULL}, 460 460 }; 461 461