[Intel-gfx] [RFC 04/10] drm/i915: Expose a PMU interface for perf queries
Rogozhkin, Dmitry V
dmitry.v.rogozhkin at intel.com
Wed Aug 23 18:40:02 UTC 2017
On Wed, 2017-08-23 at 20:01 +0200, Peter Zijlstra wrote:
> On Wed, Aug 23, 2017 at 05:51:38PM +0000, Rogozhkin, Dmitry V wrote:
>
> > https://patchwork.freedesktop.org/patch/171953/. This patch makes 'perf
> > stat -e i915/rcs0-busy/' to error out and supports 'perf stat -e
> > i915/rcs0-busy/ -a -C0'. I still think I miss something since 'perf stat
> > -e i915/rcs0-busy/ -a' will give metrics multiplied by number of active
> > CPUs, but that's look closer to what is needed.
>
> IIRC an uncore PMU should expose a cpumask through sysfs, and then perf
> tools will read that mask and auto-magically limit the number of CPUs it
> instantiates the counter on.
>
> See for instance arch/x86/events/intel/cstate.c, that is a fairly
> trivial uncore PMU, look for "DEVICE_ATTR(cpumask".
Thank you for the reference! I will go forward and try to implement this
for i915 PMU.
>
> For example, on my 2 socket 10 core ivb-ep:
>
> root at ivb-ep:~# cat /sys/bus/event_source/devices/cstate_pkg/cpumask
> 0,10
>
More information about the Intel-gfx
mailing list