drm/i915/trace: add hw_id to gem requests trace points
Subsystems (2)
PATCH v2 1/1 drm/i915/trace: add hw_id to gem requests trace points
When monitoring the GPU with i915 perf, reports are tagged with a hw id. When also tracking the requests using the kernel tracepoints, if we include the hw_id from i915_gem_context, this allows us to correlate a process with hw id fields in the OA reports.
v2: Place hw_id at the end of the tracepoint to not disrupt too much
existing tools (Chris)
--- drivers/gpu/drm/i915/i915_trace.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_trace.h +12 -6
@@ -620,6 +620,7 @@ TRACE_EVENT(i915_gem_request_queue, __field(u32, ctx) __field(u32, seqno) __field(u32, flags) +__field (u32, hw_id) ), TP_fast_assign(
@@ -628,11 +629,12 @@ TRACE_EVENT(i915_gem_request_queue, __entry->ctx = req->fence.context; __entry->seqno = req->fence.seqno; __entry->flags = flags; + __entry->hw_id = req->ctx->hw_id; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x" , +TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x, hw_id=%u" , __entry->dev, __entry->ring, __entry->ctx, __entry->seqno, - __entry->flags) + __entry->flags, __entry->hw_id) ); DECLARE_EVENT_CLASS(i915_gem_request,
@@ -645,6 +647,7 @@ DECLARE_EVENT_CLASS(i915_gem_request, __field(u32, ring) __field(u32, seqno) __field(u32, global) +__field (u32, hw_id) ), TP_fast_assign(
@@ -653,11 +656,12 @@ DECLARE_EVENT_CLASS(i915_gem_request, __entry->ctx = req->fence.context; __entry->seqno = req->fence.seqno; __entry->global = req->global_seqno; + __entry->hw_id = req->ctx->hw_id; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u" , +TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, hw_id=%u" , __entry->dev, __entry->ring, __entry->ctx, __entry->seqno, - __entry->global) + __entry->global, __entry->hw_id) ); DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
@@ -688,6 +692,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw, __field(u32, global_seqno) __field(u32, ctx) __field(u32, port) +__field (u32, hw_id) ), TP_fast_assign(
@@ -697,12 +702,13 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw, __entry->seqno = req->fence.seqno; __entry->global_seqno = req->global_seqno; __entry->port = port; + __entry->hw_id = req->ctx->hw_id; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u" , +TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u, hw_id=%u" , __entry->dev, __entry->ring, __entry->ctx, __entry->seqno, __entry->global_seqno, - __entry->port) + __entry->port, __entry->hw_id) ); DEFINE_EVENT(i915_gem_request_hw, i915_gem_request_in,
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/trace: add hw_id to gem requests trace points (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/trace: add hw_id to gem requests trace points (rev2)
URL : https://patchwork.freedesktop.org/series/35420/
State : success
== Summary ==
Series 35420v2 drm/i915/trace: add hw_id to gem requests trace points
https://patchwork.freedesktop.org/api/1.0/series/35420/revisions/2/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#101144fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:434s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:440s fi-blb-e6850 total:288 pass:222 dwarn:1 dfail:1 fail:0 skip:64 time:395s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:506s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:281s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:491s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:502s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:487s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:483s fi-elk-e7500 total:224 pass:163 dwarn:14 dfail:1 fail:0 skip:45 fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:266s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:528s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:408s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:417s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:390s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:483s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:427s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:482s fi-kbl-7560u total:288 pass:268 dwarn:1 dfail:0 fail:0 skip:19 time:525s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:470s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:526s fi-pnv-d510 total:288 pass:221 dwarn:1 dfail:0 fail:1 skip:65 time:598s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:446s fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:534s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:558s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:493s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:449s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:559s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:424s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:600s fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:620s fi-glk-dsi total:288 pass:257 dwarn:0 dfail:0 fail:1 skip:30 time:489s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:509s
84ac2c35b2ab5cb0326911fdea3bfb5f7e479b3b drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest 8248caf04938 drm/i915/trace: add hw_id to gem requests trace points
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7510/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/trace: add hw_id to gem requests trace points (rev2)
In reply to Lionel Landwerlin== Series Details ==
== Series Details ==
Series: drm/i915/trace: add hw_id to gem requests trace points (rev2)
URL : https://patchwork.freedesktop.org/series/35420/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
fail -> WARN (shard-snb) fdo#99912
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_flip:
Subgroup flip-vs-panning-vs-hang:
dmesg-warn -> PASS (shard-snb) fdo#103821
Subgroup vblank-vs-suspend:
incomplete -> PASS (shard-hsw) fdo#103375
Test gem_eio:
Subgroup in-flight-contexts:
pass -> DMESG-WARN (shard-snb) fdo#104058
Test gem_tiled_swapping:
Subgroup non-threaded:
pass -> INCOMPLETE (shard-snb) fdo#104218
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-pri-indfb-draw-render:
pass -> FAIL (shard-hsw) fdo#101623
Test kms_vblank:
Subgroup accuracy-idle:
pass -> FAIL (shard-hsw) fdo#102583fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
shard-hsw total:2678 pass:1512 dwarn:1 dfail:0 fail:12 skip:1151 time:8692s shard-snb total:2654 pass:1275 dwarn:2 dfail:0 fail:12 skip:1363 time:7726s
Blacklisted hosts:
shard-apl total:2712 pass:1685 dwarn:1 dfail:0 fail:25 skip:1001 time:13877s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7510/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Lionel Landwerlin (2017-12-15 18:06:03)
Quoted 9 lines
When monitoring the GPU with i915 perf, reports are tagged with a hw id. When also tracking the requests using the kernel tracepoints, if we include the
hw_idfromi915_gem_context, this allows us to correlate a process with hw id fields in the OA reports.v2: Place
hw_idat the end of the tracepoint to not disrupt too much
existing tools (Chris)Signed-off-by Lionel Landwerlin <[email protected]>
This is a good excuse to reopen an old thread:
[email protected]
│ On 11/05/2017 14:16, Tvrtko Ursulin wrote: │ > │ > On 11/05/2017 14:07, Chris Wilson wrote: │ >> On Thu, May 11, 2017 at 02:00:45PM +0100, Tvrtko Ursulin wrote: │ >>> From: Tvrtko Ursulin <[email protected]> │ >>> │ >>> For userspace receiving binary data it is easier if all related │ >>> request tracepoints emit the binary data in the same order of │ >>> dev, ring, ctx, seqno, ... │ >> │ >> We decided that dev, ctx, ring, seqno was the right heirachy last time. │ >> After much debate :) │ >> ctx is the logical view of the device for a user │ >> ctx + ring = timeline │ > │ > I couldn't remember so I thought it must have been what is documented in │ > TP_printk. Now I am confused. On one hand it's true, but on the other │ > ctx/seqno is also a pair as opposed to engine being stuck in the middle. │ > So ring-ctx-seqno is easier for humans I think. Even since per │ > ctx/engine seqno space. │ │ [thread bump!] │ │ Can we agree what to do here? Printk's are all engine-ctx-seqno which │ makes it sound like that was the order we agreed upon. But binary blobs │ are inconsistent as you have noticed - do we care enough to go and │ fiddle with that is the question? Is overlay the only userspace to your │ knowledge that accesses the binary blobs? │ │ Regards, │ │ Tvrtko
Given that we are adding info here, we can also go through and make the order consistent. dev, hw_id, engine, ctx, seqno?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx