Re: [PATCH 2/2] perf/x86: add RAPL PP1 energy counter support
From: Ingo Molnar
Date: Tue Dec 17 2013 - 09:15:25 EST
* Stephane Eranian <eranian@xxxxxxxxxx> 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@xxxxxxxxxx>
>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/