[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131217141515.GA3364@gmail.com>
Date: Tue, 17 Dec 2013 15:15:15 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
ak@...ux.intel.com, acme@...hat.com, jolsa@...hat.com,
zheng.z.yan@...el.com, bp@...en8.de, vincent.weaver@...ne.edu,
maria.n.dimakopoulou@...il.com
Subject: Re: [PATCH 2/2] perf/x86: add RAPL PP1 energy counter support
* Stephane Eranian <eranian@...gle.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@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists