This Linux kernel change "perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters" is included in the Linux 5.1 release. This change is authored by Harry Pan <harry.pan [at] intel.com> on Wed Apr 24 22:50:33 2019 +0800. The commit for this change in Linux stable tree is 82c99f7 (patch).
perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters Kaby Lake (and Coffee Lake) has PC8/PC9/PC10 residency counters. This patch updates the list of Kaby/Coffee Lake PMU event counters from the snb_cstates list of events to the hswult_cstates list of events, which keeps all previously supported events and also adds the PKG_C8, PKG_C9 and PKG_C10 residency counters. This allows user space tools to profile them through the perf interface. Signed-off-by: Harry Pan <email@example.com> Cc: <firstname.lastname@example.org> Cc: Alexander Shishkin <email@example.com> Cc: Arnaldo Carvalho de Melo <firstname.lastname@example.org> Cc: Borislav Petkov <email@example.com> Cc: Jiri Olsa <firstname.lastname@example.org> Cc: Linus Torvalds <email@example.com> Cc: Peter Zijlstra <firstname.lastname@example.org> Cc: Stephane Eranian <email@example.com> Cc: Thomas Gleixner <firstname.lastname@example.org> Cc: Vince Weaver <email@example.com> Cc: firstname.lastname@example.org Link: http://email@example.com Signed-off-by: Ingo Molnar <firstname.lastname@example.org>
There are 10 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
arch/x86/events/intel/cstate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index 94a4b7fc..d41de9a 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c @@ -76,15 +76,15 @@ * Scope: Package (physical package) * MSR_PKG_C8_RESIDENCY: Package C8 Residency Counter. * perf code: 0x04 - * Available model: HSW ULT,CNL + * Available model: HSW ULT,KBL,CNL * Scope: Package (physical package) * MSR_PKG_C9_RESIDENCY: Package C9 Residency Counter. * perf code: 0x05 - * Available model: HSW ULT,CNL + * Available model: HSW ULT,KBL,CNL * Scope: Package (physical package) * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. * perf code: 0x06 - * Available model: HSW ULT,GLM,CNL + * Available model: HSW ULT,KBL,GLM,CNL * Scope: Package (physical package) * */ @@ -566,8 +566,8 @@ static int cstate_cpu_init(unsigned int cpu) X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates), X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_X, snb_cstates), - X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_MOBILE, snb_cstates), - X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_DESKTOP, snb_cstates), + X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_MOBILE, hswult_cstates), + X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_DESKTOP, hswult_cstates), X86_CSTATES_MODEL(INTEL_FAM6_CANNONLAKE_MOBILE, cnl_cstates),