[Intel-gfx] [PATCH 0/6] Collect command stream based GPU metrics for all engines using i915 perf

sourab.gupta at intel.com sourab.gupta at intel.com
Thu Mar 16 06:20:05 UTC 2017


From: Sourab Gupta <sourab.gupta at intel.com>

This series adds framework for collection of gpu performance metrics
associated with the command stream of a particular engine. These metrics
include OA reports for render stream and timestamps, mmio metrics, etc. for
other gpu engine streams. These metrics are are collected around batchbuffer
boundaries.
Essentially, it expands upon Robert's i915 perf framework for collecting
periodic OA reports, to enable it to collect metrics on multiple GPU engines
concurrently, by having concurrent streams each associated with a particular
GPU engine.

This series is based on top of the patch series for collecting OA metrics for
render stream, which I sent earlier:
https://patchwork.freedesktop.org/series/21351/

There are a couple of patches which add support for using the cross-timestamp
framework for retrieving tightly coupled device/system timestamps.
In our case, this framework enables us to have correlated pairs of gpu+system
time which can be used over a period of time to correct the frequency of
timestamp clock, and thus enable to accurately send system time (_MONO_RAW)
as requested to the userspace. The results are generally observed to quite
better with the use of cross timestamps and the frequency delta gradually
tapers down to 0 with increasing correction periods.
The use of cross timestamp framework though requires us to have
clockcounter/timecounter abstraction for the timestamp clocksource, and
further requires few changes in the kernel timekeeping/clocksource code.
I am looking for feedback on the use of this framework and the changes
involved.

The patches can also be found at:
https://github.com/sourabgu/linux/tree/oa-6march2017

Sourab Gupta (6):
  drm/i915: Extend i915 perf framework for collecting timestamps on all
    gpu engines
  drm/i915: Extract raw GPU timestamps from OA reports to forward in
    perf samples
  drm/i915: Support opening multiple concurrent perf streams
  time: Expose current clocksource in use by timekeeping framework
  drm/i915: Mechanism to forward clock monotonic raw time in perf
    samples
  drm/i915: Support for capturing MMIO register values

 drivers/gpu/drm/i915/i915_drv.c  |   15 +
 drivers/gpu/drm/i915/i915_drv.h  |   90 ++-
 drivers/gpu/drm/i915/i915_perf.c | 1136 +++++++++++++++++++++++++++++---------
 drivers/gpu/drm/i915/i915_reg.h  |    6 +
 include/linux/timekeeping.h      |    5 +
 include/uapi/drm/i915_drm.h      |   28 +
 kernel/time/timekeeping.c        |   12 +
 7 files changed, 1029 insertions(+), 263 deletions(-)

-- 
1.9.1



More information about the Intel-gfx mailing list