drm/i915/trace: add hw_id to gem requests trace points
Subsystems (2)
PATCH 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.
--- drivers/gpu/drm/i915/i915_trace.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/i915_trace.h +15 -9
@@ -618,6 +618,7 @@ TRACE_EVENT(i915_gem_request_queue, __field(u32, dev) __field(u32, ring) __field(u32, ctx) + __field(u32, hw_id) __field(u32, seqno)__field (u32, flags) ),
@@ -626,13 +627,14 @@ TRACE_EVENT(i915_gem_request_queue, __entry->dev = req->i915->drm.primary->index; __entry->ring = req->engine->id; __entry->ctx = req->fence.context; + __entry->hw_id = req->ctx->hw_id; __entry->seqno = req->fence.seqno; __entry->flags = flags; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x" , - __entry->dev, __entry->ring, __entry->ctx, __entry->seqno, - __entry->flags) +TP_printk ("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, flags=0x%x" , + __entry->dev, __entry->ring, __entry->ctx, __entry->hw_id, + __entry->seqno, __entry->flags) ); DECLARE_EVENT_CLASS(i915_gem_request,
@@ -642,6 +644,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,TP_STRUCT__entry (__field (u32 ,dev )__field (u32, ctx) +__field (u32, hw_id)__field (u32, ring)__field (u32, seqno) __field(u32, global)
@@ -651,13 +654,14 @@ DECLARE_EVENT_CLASS(i915_gem_request, __entry->dev = req->i915->drm.primary->index; __entry->ring = req->engine->id; __entry->ctx = req->fence.context; + __entry->hw_id = req->ctx->hw_id; __entry->seqno = req->fence.seqno; __entry->global = req->global_seqno; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u" , - __entry->dev, __entry->ring, __entry->ctx, __entry->seqno, - __entry->global) +TP_printk ("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, global=%u" , + __entry->dev, __entry->ring, __entry->ctx, __entry->hw_id, + __entry->seqno, __entry->global) ); DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
@@ -687,6 +691,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw, __field(u32, seqno) __field(u32, global_seqno) __field(u32, ctx) + __field(u32, hw_id)__field (u32, port) ),
@@ -694,15 +699,16 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw, __entry->dev = req->i915->drm.primary->index; __entry->ring = req->engine->id; __entry->ctx = req->fence.context; + __entry->hw_id = req->ctx->hw_id; __entry->seqno = req->fence.seqno; __entry->global_seqno = req->global_seqno; __entry->port = port; ), -TP_printk ("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u" , +TP_printk ("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, global=%u, port=%u" , __entry->dev, __entry->ring, __entry->ctx, - __entry->seqno, __entry->global_seqno, - __entry->port) + __entry->hw_id, __entry->seqno, + __entry->global_seqno, __entry->port) ); 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
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
Quoted 4 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.
Maybe, but don't split the fence.context and fence.seqno. You should also update the igt tools using the tracepoints.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Chris Wilson
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
Quoted 4 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.Maybe, but don't split the fence.context and fence.seqno. You should also update the igt tools using the tracepoints.
-Chris
I would have thought the tools could deal with a different ordering :(
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Lionel Landwerlin
Quoted 9 lines · Chris Wilson
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
Quoted 4 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.Maybe, but don't split the fence.context and fence.seqno. You should also update the igt tools using the tracepoints.
-ChrisI would have thought the tools could deal with a different ordering :(
At least as a benefit you get to refresh your Perl skills. ;)
trace.pl and intel-gpu-overlay I think are the only two.
I guess it would be possible to smarten both up to detect where the fields they need are located but maybe too much work.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2017-12-15 17:22:57)
Quoted 12 lines · Lionel Landwerlin
Quoted 10 lines · Chris Wilson
Quoted 9 lines
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
Quoted 4 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.Maybe, but don't split the fence.context and fence.seqno. You should also update the igt tools using the tracepoints.
-Chris
Quoted 8 lines
Quoted 1 line
I would have thought the tools could deal with a different ordering :(
At least as a benefit you get to refresh your Perl skills. ;)
trace.pl and intel-gpu-overlay I think are the only two.
I guess it would be possible to smarten both up to detect where the fields they need are located but maybe too much work.
That's the thinking that got us into this mess to begin with ;)
But yes, it may remain much easier to keep igt in line with the kernel and just say no to backwards-compatibility for these devtools. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · Chris Wilson
Quoting Tvrtko Ursulin (2017-12-15 17:22:57)
Quoted 16 lines · Lionel Landwerlin
Quoted 11 lines · Chris Wilson
Quoted 9 lines
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
Quoted 4 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.Maybe, but don't split the fence.context and fence.seqno. You should also update the igt tools using the tracepoints.
-ChrisI would have thought the tools could deal with a different ordering :(
At least as a benefit you get to refresh your Perl skills. ;)
trace.pl and intel-gpu-overlay I think are the only two.
Quoted 8 lines
Quoted 2 lines
I guess it would be possible to smarten both up to detect where the fields they need are located but maybe too much work.
That's the thinking that got us into this mess to begin with ;)
But yes, it may remain much easier to keep igt in line with the kernel and just say no to backwards-compatibility for these devtools. -Chris
Like I said on IRC, I wrote a small parser in peg : https://github.com/rib/gputop/blob/imgui/gputop-ui/tracepoint_format.leg
That's enough to get the fields' location/size, but not to interpret whether something's a pointer rather than u32/64. Using a peg parser limits the pain quite a bit. Those should be available in python as well (don't know about perl).
-
Lionel
_______________________________________________
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
In reply to Lionel Landwerlin== Series Details ==
== Series Details ==
Series: drm/i915/trace: add hw_id to gem requests trace points
URL : https://patchwork.freedesktop.org/series/35420/
State : success
== Summary ==
Series 35420v1 drm/i915/trace: add hw_id to gem requests trace points
https://patchwork.freedesktop.org/api/1.0/series/35420/revisions/1/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> INCOMPLETE (fi-bdw-5557u) fdo#104057
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#101144fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104057 https://bugs.freedesktop.org/show_bug.cgi?id=104057
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fi-bdw-5557u total:244 pass:226 dwarn:0 dfail:0 fail:0 skip:17 fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:443s fi-blb-e6850 total:288 pass:222 dwarn:1 dfail:1 fail:0 skip:64 time:396s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:492s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:277s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:494s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:501s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:482s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:468s fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:1 dfail:0 fail:0 skip:108 time:261s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:534s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:404s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:413s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:386s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:478s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:424s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:480s 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:466s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:527s fi-pnv-d510 total:288 pass:221 dwarn:1 dfail:0 fail:1 skip:65 time:596s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:443s fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:529s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:553s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:485s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:457s fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:419s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:588s fi-glk-dsi total:167 pass:80 dwarn:0 dfail:1 fail:1 skip:84 fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:504s
84ac2c35b2ab5cb0326911fdea3bfb5f7e479b3b drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest d60f96a85ee9 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_7509/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx