Re: [PATCH 3/3] show energy consumption info in perf tool

From: Ingo Molnar
Date: Thu May 26 2011 - 06:50:05 EST



* Zhang Rui <rui.zhang@xxxxxxxxx> wrote:

> Introduce four new perf software events
>
> PERF_COUNT_SW_PKG_ENERGY
> PERF_COUNT_SW_CORE_ENERGY
> PERF_COUNT_SW_UNCORE_ENERGY
> and
> PERF_COUNT_SW_DRAM_ENERGY
>
> To use it, users can run
> perf stat -e pkg-energy foo
> to get the package energy consumption when running foo.

That's very interesting - being able to profile workloads by
power/energy use looks like a *very* powerful feature.

Are you allowed to show us some sample output of the data? What's the
granularity of this info? Say what is the output of:

perf stat -e pkg-energy -e core-energy -e uncore-energy -e dram-energy -a sleep 10

?

Also, have you tried something like:

perf record -a -e pkg-energy sleep 60

perf report

To see where most of the energy is used within a 1 minute interval?

Also, conceptually these are really hardware events, right?

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/