Messages in this thread | | | Date | Tue, 17 Dec 2013 15:15:15 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 2/2] perf/x86: add RAPL PP1 energy counter support |
| |
* Stephane Eranian <eranian@google.com> wrote:
> Add support for the RAPL energy counter PP1. > > On client processors, it usually correspondss to the > energy consumption of the builtin graphic card. > > New event: > - name: power/energy-gfx/ > - code: event=0x4 > - unit: 2^-32 Joules > > On processors without graphics, this should count 0. > The patch only enables this event on client processors. > > Signed-off-by: Stephane Eranian <eranian@google.com> > > --- > arch/x86/kernel/cpu/perf_event_intel_rapl.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c > index 0e3754e..b2dc346 100644 > --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c > +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c > @@ -55,10 +55,13 @@ > #define INTEL_RAPL_PKG 0x2 /* pseudo-encoding */ > #define RAPL_IDX_RAM_NRG_STAT 2 /* DRAM */ > #define INTEL_RAPL_RAM 0x3 /* pseudo-encoding */ > +#define RAPL_IDX_PP1_NRG_STAT 3 /* DRAM */ > +#define INTEL_RAPL_PP1 0x4 /* pseudo-encoding */
Another problem I noticed is that there's a pretty good description at the top of perf_event_intel_rapl.c, but it does not get updated with this new pp1/gfx/gpu angle.
Thanks,
Ingo
| |