All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/i915: improve tracepoints for process/hw_id tracking
@ 2017-12-18 12:12 Lionel Landwerlin
  2017-12-18 12:12 ` [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints Lionel Landwerlin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lionel Landwerlin @ 2017-12-18 12:12 UTC (permalink / raw)
  To: intel-gfx

Hi,

These are just a couple of changes to allow process/hw_id correlation
when using i915 perf to monitor the workloads on the GPU.

Cheers,

Lionel Landwerlin (2):
  drm/i915: reorder field in gem_request tracepoints
  drm/i915/trace: add hw_id to gem requests trace points

 drivers/gpu/drm/i915/i915_trace.h | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints
  2017-12-18 12:12 [PATCH 0/2] drm/i915: improve tracepoints for process/hw_id tracking Lionel Landwerlin
@ 2017-12-18 12:12 ` Lionel Landwerlin
  2017-12-18 13:32   ` Chris Wilson
  2017-12-18 12:12 ` [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points Lionel Landwerlin
  2017-12-18 12:52 ` ✓ Fi.CI.BAT: success for drm/i915: improve tracepoints for process/hw_id tracking Patchwork
  2 siblings, 1 reply; 7+ messages in thread
From: Lionel Landwerlin @ 2017-12-18 12:12 UTC (permalink / raw)
  To: intel-gfx

Let's make the order of the fields of the tracepoints involving gem
request match across i915. This makes userspace processing of
tracepoint a bit easier.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_trace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 4e76768ffa95..321f74bae0e1 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -641,8 +641,8 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_STRUCT__entry(
 			     __field(u32, dev)
-			     __field(u32, ctx)
 			     __field(u32, ring)
+			     __field(u32, ctx)
 			     __field(u32, seqno)
 			     __field(u32, global)
 			     ),
@@ -684,9 +684,9 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 		    TP_STRUCT__entry(
 				     __field(u32, dev)
 				     __field(u32, ring)
+				     __field(u32, ctx)
 				     __field(u32, seqno)
 				     __field(u32, global_seqno)
-				     __field(u32, ctx)
 				     __field(u32, port)
 				    ),
 
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points
  2017-12-18 12:12 [PATCH 0/2] drm/i915: improve tracepoints for process/hw_id tracking Lionel Landwerlin
  2017-12-18 12:12 ` [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints Lionel Landwerlin
@ 2017-12-18 12:12 ` Lionel Landwerlin
  2017-12-18 13:35   ` Chris Wilson
  2017-12-18 12:52 ` ✓ Fi.CI.BAT: success for drm/i915: improve tracepoints for process/hw_id tracking Patchwork
  2 siblings, 1 reply; 7+ messages in thread
From: Lionel Landwerlin @ 2017-12-18 12:12 UTC (permalink / raw)
  To: intel-gfx

When monitoring the GPU with i915 perf, reports are tagged with a hw
id. Gem context creation tracepoints already have a hw_id field,
unfortunately you only get this correlation between a process id and a
hw context id once when the context is created. It doesn't help if you
started monitoring after the process was initialized or if the drm fd
was transfered from one process to another.

This change adds the hw_id field to gem requests, so that correlation
can also be done on submission.

v2: Place hw_id at the end of the tracepoint to not disrupt too much
    existing tools (Chris)

v3: Reorder hw_id field again (Chris)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_trace.h | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 321f74bae0e1..042c43a4bd59 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -616,6 +616,7 @@ TRACE_EVENT(i915_gem_request_queue,
 
 	    TP_STRUCT__entry(
 			     __field(u32, dev)
+			     __field(u32, hw_id)
 			     __field(u32, ring)
 			     __field(u32, ctx)
 			     __field(u32, seqno)
@@ -624,15 +625,16 @@ TRACE_EVENT(i915_gem_request_queue,
 
 	    TP_fast_assign(
 			   __entry->dev = req->i915->drm.primary->index;
+			   __entry->hw_id = req->ctx->hw_id;
 			   __entry->ring = req->engine->id;
 			   __entry->ctx = req->fence.context;
 			   __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x",
+		      __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
+		      __entry->seqno, __entry->flags)
 );
 
 DECLARE_EVENT_CLASS(i915_gem_request,
@@ -641,6 +643,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_STRUCT__entry(
 			     __field(u32, dev)
+			     __field(u32, hw_id)
 			     __field(u32, ring)
 			     __field(u32, ctx)
 			     __field(u32, seqno)
@@ -649,15 +652,16 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_fast_assign(
 			   __entry->dev = req->i915->drm.primary->index;
+			   __entry->hw_id = req->ctx->hw_id;
 			   __entry->ring = req->engine->id;
 			   __entry->ctx = req->fence.context;
 			   __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
+		      __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
+		      __entry->seqno, __entry->global)
 );
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
@@ -683,6 +687,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 
 		    TP_STRUCT__entry(
 				     __field(u32, dev)
+				     __field(u32, hw_id)
 				     __field(u32, ring)
 				     __field(u32, ctx)
 				     __field(u32, seqno)
@@ -692,6 +697,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 
 		    TP_fast_assign(
 			           __entry->dev = req->i915->drm.primary->index;
+			           __entry->hw_id = req->ctx->hw_id;
 			           __entry->ring = req->engine->id;
 			           __entry->ctx = req->fence.context;
 			           __entry->seqno = req->fence.seqno;
@@ -699,10 +705,10 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 			           __entry->port = port;
 			          ),
 
-		    TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
-			      __entry->dev, __entry->ring, __entry->ctx,
-			      __entry->seqno, __entry->global_seqno,
-			      __entry->port)
+		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
+			      __entry->dev, __entry->hw_id, __entry->ring,
+			      __entry->ctx, __entry->seqno,
+			      __entry->global_seqno, __entry->port)
 );
 
 DEFINE_EVENT(i915_gem_request_hw, i915_gem_request_in,
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: improve tracepoints for process/hw_id tracking
  2017-12-18 12:12 [PATCH 0/2] drm/i915: improve tracepoints for process/hw_id tracking Lionel Landwerlin
  2017-12-18 12:12 ` [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints Lionel Landwerlin
  2017-12-18 12:12 ` [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points Lionel Landwerlin
@ 2017-12-18 12:52 ` Patchwork
  2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-18 12:52 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: improve tracepoints for process/hw_id tracking
URL   : https://patchwork.freedesktop.org/series/35506/
State : success

== Summary ==

Series 35506v1 drm/i915: improve tracepoints for process/hw_id tracking
https://patchwork.freedesktop.org/api/1.0/series/35506/revisions/1/mbox/

Test gem_exec_reloc:
        Subgroup basic-gtt-cpu:
                pass       -> INCOMPLETE (fi-byt-j1900) fdo#102657
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-kbl-r) fdo#104172
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                dmesg-warn -> PASS       (fi-skl-6700hq) fdo#101144

fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
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:432s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:441s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:384s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:497s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:275s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:490s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:501s
fi-byt-j1900     total:74   pass:64   dwarn:0   dfail:0   fail:0   skip:9  
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:469s
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:262s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:529s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:403s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:415s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:383s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:480s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:425s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:479s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:511s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:463s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:526s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:582s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:444s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:530s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:552s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:506s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:489s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:448s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:544s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:410s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:599s
fi-cnl-y         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:614s
fi-glk-dsi       total:132  pass:65   dwarn:0   dfail:1   fail:0   skip:65 

bf5cdf9e055a88559a6fc707b6e89e88077a2124 drm-tip: 2017y-12m-18d-11h-53m-39s UTC integration manifest
e3fedfb57294 drm/i915/trace: add hw_id to gem requests trace points
294ba5538aec drm/i915: reorder field in gem_request tracepoints

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7524/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints
  2017-12-18 12:12 ` [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints Lionel Landwerlin
@ 2017-12-18 13:32   ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-12-18 13:32 UTC (permalink / raw)
  To: Lionel Landwerlin, intel-gfx

Quoting Lionel Landwerlin (2017-12-18 12:12:47)
> Let's make the order of the fields of the tracepoints involving gem
> request match across i915. This makes userspace processing of
> tracepoint a bit easier.
> 
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

We could argue for days upon the preferred ordering of ctx/ring/seqno,
but I think the best compromise is indeed hw_id/ring/ctx/seqno.

I couldn't see any remaining inconsistencies,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points
  2017-12-18 12:12 ` [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points Lionel Landwerlin
@ 2017-12-18 13:35   ` Chris Wilson
  2017-12-18 14:17     ` Lionel Landwerlin
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-12-18 13:35 UTC (permalink / raw)
  To: Lionel Landwerlin, intel-gfx

Quoting Lionel Landwerlin (2017-12-18 12:12:48)
> When monitoring the GPU with i915 perf, reports are tagged with a hw
> id. Gem context creation tracepoints already have a hw_id field,
> unfortunately you only get this correlation between a process id and a
> hw context id once when the context is created. It doesn't help if you
> started monitoring after the process was initialized or if the drm fd
> was transfered from one process to another.
> 
> This change adds the hw_id field to gem requests, so that correlation
> can also be done on submission.
> 
> v2: Place hw_id at the end of the tracepoint to not disrupt too much
>     existing tools (Chris)
> 
> v3: Reorder hw_id field again (Chris)
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_trace.h | 26 ++++++++++++++++----------
>  1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index 321f74bae0e1..042c43a4bd59 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -616,6 +616,7 @@ TRACE_EVENT(i915_gem_request_queue,
>  
>             TP_STRUCT__entry(
>                              __field(u32, dev)
> +                            __field(u32, hw_id)
>                              __field(u32, ring)
>                              __field(u32, ctx)
>                              __field(u32, seqno)
> @@ -624,15 +625,16 @@ TRACE_EVENT(i915_gem_request_queue,
>  
>             TP_fast_assign(
>                            __entry->dev = req->i915->drm.primary->index;
> +                          __entry->hw_id = req->ctx->hw_id;
>                            __entry->ring = req->engine->id;
>                            __entry->ctx = req->fence.context;
>                            __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x",
> +                     __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
> +                     __entry->seqno, __entry->flags)
>  );
>  
>  DECLARE_EVENT_CLASS(i915_gem_request,
> @@ -641,6 +643,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,
>  
>             TP_STRUCT__entry(
>                              __field(u32, dev)
> +                            __field(u32, hw_id)
>                              __field(u32, ring)
>                              __field(u32, ctx)
>                              __field(u32, seqno)
> @@ -649,15 +652,16 @@ DECLARE_EVENT_CLASS(i915_gem_request,
>  
>             TP_fast_assign(
>                            __entry->dev = req->i915->drm.primary->index;
> +                          __entry->hw_id = req->ctx->hw_id;
>                            __entry->ring = req->engine->id;
>                            __entry->ctx = req->fence.context;
>                            __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
> +                     __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
> +                     __entry->seqno, __entry->global)
>  );
>  
>  DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
> @@ -683,6 +687,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>  
>                     TP_STRUCT__entry(
>                                      __field(u32, dev)
> +                                    __field(u32, hw_id)
>                                      __field(u32, ring)
>                                      __field(u32, ctx)
>                                      __field(u32, seqno)
> @@ -692,6 +697,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>  
>                     TP_fast_assign(
>                                    __entry->dev = req->i915->drm.primary->index;
> +                                  __entry->hw_id = req->ctx->hw_id;
>                                    __entry->ring = req->engine->id;
>                                    __entry->ctx = req->fence.context;
>                                    __entry->seqno = req->fence.seqno;
> @@ -699,10 +705,10 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>                                    __entry->port = port;
>                                   ),
>  
> -                   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
> -                             __entry->dev, __entry->ring, __entry->ctx,
> -                             __entry->seqno, __entry->global_seqno,
> -                             __entry->port)
> +                   TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
> +                             __entry->dev, __entry->hw_id, __entry->ring,
> +                             __entry->ctx, __entry->seqno,
> +                             __entry->global_seqno, __entry->port)
>  );

Missed i915_gem_request_wait_begin?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points
  2017-12-18 13:35   ` Chris Wilson
@ 2017-12-18 14:17     ` Lionel Landwerlin
  0 siblings, 0 replies; 7+ messages in thread
From: Lionel Landwerlin @ 2017-12-18 14:17 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On 18/12/17 13:35, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2017-12-18 12:12:48)
>> When monitoring the GPU with i915 perf, reports are tagged with a hw
>> id. Gem context creation tracepoints already have a hw_id field,
>> unfortunately you only get this correlation between a process id and a
>> hw context id once when the context is created. It doesn't help if you
>> started monitoring after the process was initialized or if the drm fd
>> was transfered from one process to another.
>>
>> This change adds the hw_id field to gem requests, so that correlation
>> can also be done on submission.
>>
>> v2: Place hw_id at the end of the tracepoint to not disrupt too much
>>      existing tools (Chris)
>>
>> v3: Reorder hw_id field again (Chris)
>>
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_trace.h | 26 ++++++++++++++++----------
>>   1 file changed, 16 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
>> index 321f74bae0e1..042c43a4bd59 100644
>> --- a/drivers/gpu/drm/i915/i915_trace.h
>> +++ b/drivers/gpu/drm/i915/i915_trace.h
>> @@ -616,6 +616,7 @@ TRACE_EVENT(i915_gem_request_queue,
>>   
>>              TP_STRUCT__entry(
>>                               __field(u32, dev)
>> +                            __field(u32, hw_id)
>>                               __field(u32, ring)
>>                               __field(u32, ctx)
>>                               __field(u32, seqno)
>> @@ -624,15 +625,16 @@ TRACE_EVENT(i915_gem_request_queue,
>>   
>>              TP_fast_assign(
>>                             __entry->dev = req->i915->drm.primary->index;
>> +                          __entry->hw_id = req->ctx->hw_id;
>>                             __entry->ring = req->engine->id;
>>                             __entry->ctx = req->fence.context;
>>                             __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x",
>> +                     __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
>> +                     __entry->seqno, __entry->flags)
>>   );
>>   
>>   DECLARE_EVENT_CLASS(i915_gem_request,
>> @@ -641,6 +643,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,
>>   
>>              TP_STRUCT__entry(
>>                               __field(u32, dev)
>> +                            __field(u32, hw_id)
>>                               __field(u32, ring)
>>                               __field(u32, ctx)
>>                               __field(u32, seqno)
>> @@ -649,15 +652,16 @@ DECLARE_EVENT_CLASS(i915_gem_request,
>>   
>>              TP_fast_assign(
>>                             __entry->dev = req->i915->drm.primary->index;
>> +                          __entry->hw_id = req->ctx->hw_id;
>>                             __entry->ring = req->engine->id;
>>                             __entry->ctx = req->fence.context;
>>                             __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, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
>> +                     __entry->dev, __entry->hw_id, __entry->ring, __entry->ctx,
>> +                     __entry->seqno, __entry->global)
>>   );
>>   
>>   DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
>> @@ -683,6 +687,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>>   
>>                      TP_STRUCT__entry(
>>                                       __field(u32, dev)
>> +                                    __field(u32, hw_id)
>>                                       __field(u32, ring)
>>                                       __field(u32, ctx)
>>                                       __field(u32, seqno)
>> @@ -692,6 +697,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>>   
>>                      TP_fast_assign(
>>                                     __entry->dev = req->i915->drm.primary->index;
>> +                                  __entry->hw_id = req->ctx->hw_id;
>>                                     __entry->ring = req->engine->id;
>>                                     __entry->ctx = req->fence.context;
>>                                     __entry->seqno = req->fence.seqno;
>> @@ -699,10 +705,10 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
>>                                     __entry->port = port;
>>                                    ),
>>   
>> -                   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
>> -                             __entry->dev, __entry->ring, __entry->ctx,
>> -                             __entry->seqno, __entry->global_seqno,
>> -                             __entry->port)
>> +                   TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
>> +                             __entry->dev, __entry->hw_id, __entry->ring,
>> +                             __entry->ctx, __entry->seqno,
>> +                             __entry->global_seqno, __entry->port)
>>   );
> Missed i915_gem_request_wait_begin?
> -Chris
>
Indeed, apologies :|

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-18 14:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 12:12 [PATCH 0/2] drm/i915: improve tracepoints for process/hw_id tracking Lionel Landwerlin
2017-12-18 12:12 ` [PATCH 1/2] drm/i915: reorder field in gem_request tracepoints Lionel Landwerlin
2017-12-18 13:32   ` Chris Wilson
2017-12-18 12:12 ` [PATCH 2/2] drm/i915/trace: add hw_id to gem requests trace points Lionel Landwerlin
2017-12-18 13:35   ` Chris Wilson
2017-12-18 14:17     ` Lionel Landwerlin
2017-12-18 12:52 ` ✓ Fi.CI.BAT: success for drm/i915: improve tracepoints for process/hw_id tracking Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.