Re: [PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support

2020-05-20 Thread Stephane Eranian
Hi, On Mon, May 18, 2020 at 1:16 PM Stephane Eranian wrote: > > On Mon, May 18, 2020 at 2:34 AM Peter Zijlstra wrote: > > > > On Fri, May 15, 2020 at 02:57:33PM -0700, Stephane Eranian wrote: > > > > > +static struct perf_msr amd_rapl_msrs[] = { > > > + [PERF_RAPL_PP0] = { 0, &rapl_events_c

Re: [PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support

2020-05-18 Thread Stephane Eranian
On Mon, May 18, 2020 at 2:34 AM Peter Zijlstra wrote: > > On Fri, May 15, 2020 at 02:57:33PM -0700, Stephane Eranian wrote: > > > +static struct perf_msr amd_rapl_msrs[] = { > > + [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, NULL}, > > + [PERF_RAPL_PKG] = { MSR_AMD_PKG_ENERGY_STATUS,

Re: [PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support

2020-05-18 Thread Peter Zijlstra
On Fri, May 15, 2020 at 02:57:33PM -0700, Stephane Eranian wrote: > +static struct perf_msr amd_rapl_msrs[] = { > + [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, NULL}, > + [PERF_RAPL_PKG] = { MSR_AMD_PKG_ENERGY_STATUS, > &rapl_events_pkg_group, test_msr }, > + [PERF_RAPL_RAM]

[PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support

2020-05-15 Thread Stephane Eranian
This patch enables AMD Fam17h RAPL support for the Package level metric. The support is as per AMD Fam17h Model31h (Zen2) and model 00-ffh (Zen1) PPR. The same output is available via the energy-pkg pseudo event: $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/ Signed-off-by: Stephane Er