Skip to content

Collect command stream based GPU metrics for all engines using i915 perf

[email protected] intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/i915: Extend i915 perf framework for collecting timestamps on all gpu enginesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c drivers/gpu/drm/i915/i915_reg.h +1 more+502 -2552 replies
2/6drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samplesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c drivers/gpu/drm/i915/i915_reg.h+41 -130 replies
3/6drm/i915: Support opening multiple concurrent perf streamsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c+24 -190 replies
4/6time: Expose current clocksource in use by timekeeping frameworkinclude/linux/timekeeping.h kernel/time/timekeeping.c+17 -01 reply
5/6drm/i915: Mechanism to forward clock monotonic raw time in perf samplesdrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c +1 more+305 -120 replies
6/6drm/i915: Support for capturing MMIO register valuesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c include/uapi/drm/i915_drm.h+179 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Collect command stream based GPU metrics for all engines using i915 perf

From: Sourab Gupta <[email protected]>

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(-)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx