perf/x86/intel: Extend the ref-cycles event to GP counters
authorKan Liang <kan.liang@linux.intel.com>
Mon, 11 Sep 2023 14:41:38 +0000 (07:41 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 12 Sep 2023 06:22:24 +0000 (08:22 +0200)
commitffbe4ab0beda55b5c467aa3d95ca14db75a84717
tree058c6aea1064ad6be1dd0cf1360891fdea8acbf1
parent950ecdc672aec9cd29036b2e2535b07c103af494
perf/x86/intel: Extend the ref-cycles event to GP counters

The current ref-cycles event is only available on the fixed counter 2.
Starting from the GLC and GRT core, the architectural UnHalted Reference
Cycles event (0x013c) which is available on general-purpose counters
can collect the exact same events as the fixed counter 2.

Update the mapping of ref-cycles to 0x013c. So the ref-cycles can be
available on both fixed counter 2 and general-purpose counters.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230911144139.2354015-1-kan.liang@linux.intel.com
arch/x86/events/intel/core.c