Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
To: "Kalvala, Haridhar" <haridhar.kalvala@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [Intel-xe] [PATCH 2/2] drm/xe/trace: Optimize trace definition
Date: Thu, 19 Oct 2023 14:42:08 +0530	[thread overview]
Message-ID: <ZTDy6ChIDtvWk59N@bvivekan-mobl> (raw)
In-Reply-To: <89447f6c-7af0-a185-6517-5c9252151db0@intel.com>

On 18.10.2023 13:26, Kalvala, Haridhar wrote:
> 
> On 10/16/2023 3:47 PM, Balasubramani Vivekanandan wrote:
> > Make use of EVENT_CLASS to group similar trace events
> > 
> > Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> > ---
> >   drivers/gpu/drm/xe/xe_trace.h | 83 +++++++++++++++--------------------
> >   1 file changed, 36 insertions(+), 47 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h
> > index 456c776f4be1..233b982f34da 100644
> > --- a/drivers/gpu/drm/xe/xe_trace.h
> > +++ b/drivers/gpu/drm/xe/xe_trace.h
> > @@ -517,55 +517,44 @@ DEFINE_EVENT(xe_vm, xe_vm_rebind_worker_exit,
> >   	     TP_ARGS(vm)
> >   );
> > -TRACE_EVENT(xe_guc_ct_h2g_flow_control,
> > -	    TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
> > -	    TP_ARGS(_head, _tail, size, space, len),
> >   /* GUC */
> > +DECLARE_EVENT_CLASS(xe_guc_ct_flow_control,
> > +		    TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
> > +		    TP_ARGS(_head, _tail, size, space, len),
> > -	    TP_STRUCT__entry(
> > -		     __field(u32, _head)
> > -		     __field(u32, _tail)
> > -		     __field(u32, size)
> > -		     __field(u32, space)
> > -		     __field(u32, len)
> > -		     ),
> > -
> > -	    TP_fast_assign(
> > -		   __entry->_head = _head;
> > -		   __entry->_tail = _tail;
> > -		   __entry->size = size;
> > -		   __entry->space = space;
> > -		   __entry->len = len;
> > -		   ),
> > -
> > -	    TP_printk("head=%u, tail=%u, size=%u, space=%u, len=%u",
> > -		      __entry->_head, __entry->_tail, __entry->size,
> > -		      __entry->space, __entry->len)
> > -);
> > -
> > -TRACE_EVENT(xe_guc_ct_g2h_flow_control,
> > -	    TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
> > -	    TP_ARGS(_head, _tail, size, space, len),
> > -
> > -	    TP_STRUCT__entry(
> > -		     __field(u32, _head)
> > -		     __field(u32, _tail)
> > -		     __field(u32, size)
> > -		     __field(u32, space)
> > -		     __field(u32, len)
> > -		     ),
> > -
> > -	    TP_fast_assign(
> > -		   __entry->_head = _head;
> > -		   __entry->_tail = _tail;
> > -		   __entry->size = size;
> > -		   __entry->space = space;
> > -		   __entry->len = len;
> > -		   ),
> > -
> > -	    TP_printk("head=%u, tail=%u, size=%u, space=%u, len=%u",
> > -		      __entry->_head, __entry->_tail, __entry->size,
> > -		      __entry->space, __entry->len)
> > +		    TP_STRUCT__entry(
> > +			     __field(u32, _head)
> > +			     __field(u32, _tail)
> > +			     __field(u32, size)
> > +			     __field(u32, space)
> > +			     __field(u32, len)
> > +			     ),
> > +
> > +		    TP_fast_assign(
> > +			   __entry->_head = _head;
> > +			   __entry->_tail = _tail;
> > +			   __entry->size = size;
> > +			   __entry->space = space;
> > +			   __entry->len = len;
> > +			   ),
> > +
> > +		    TP_printk("h2g flow control: head=%u, tail=%u, size=%u, space=%u, len=%u",
> > +			      __entry->_head, __entry->_tail, __entry->size,
> > +			      __entry->space, __entry->len)
> > +);
> > +
> > +DEFINE_EVENT(xe_guc_ct_flow_control, xe_guc_ct_h2g_flow_control,
> > +	     TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
> > +	     TP_ARGS(_head, _tail, size, space, len)
> > +);
> > +
> > +DEFINE_EVENT_PRINT(xe_guc_ct_flow_control, xe_guc_ct_g2h_flow_control,
> > +		   TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
> > +		   TP_ARGS(_head, _tail, size, space, len),
> > +
> 
> Hi Bala,
> 
> This patch looks good to me. basic query why line space b/w ARGS & printk ?

I simply followed the pattern existing for other trace events.

Regards,
Bala
> 
> Reviewed-by: Haridhar Kalvala <haridhar.kalvala@intel.com>
> 
> > +		   TP_printk("g2h flow control: head=%u, tail=%u, size=%u, space=%u, len=%u",
> > +			     __entry->_head, __entry->_tail, __entry->size,
> > +			     __entry->space, __entry->len)
> >   );
> >   DECLARE_EVENT_CLASS(xe_guc_ctb,
> 
> -- 
> Regards,
> Haridhar Kalvala
> 

  reply	other threads:[~2023-10-19  9:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 10:17 [Intel-xe] [PATCH 0/2] Event tracing for GuC CTB Balasubramani Vivekanandan
2023-10-16 10:15 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-10-16 10:15 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-10-16 10:16 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-10-16 10:17 ` [Intel-xe] [PATCH 1/2] drm/xe: Add event tracing for CTB Balasubramani Vivekanandan
2023-10-18  7:49   ` Kalvala, Haridhar
2023-10-19  7:45     ` Balasubramani Vivekanandan
2023-10-25 12:27       ` Kalvala, Haridhar
2023-10-16 10:17 ` [Intel-xe] [PATCH 2/2] drm/xe/trace: Optimize trace definition Balasubramani Vivekanandan
2023-10-18  7:56   ` Kalvala, Haridhar
2023-10-19  9:12     ` Balasubramani Vivekanandan [this message]
2023-10-16 10:23 ` [Intel-xe] ✓ CI.Build: success for Event tracing for GuC CTB Patchwork
2023-10-16 10:24 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-10-16 10:25 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-10-16 10:58 ` [Intel-xe] ✓ CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTDy6ChIDtvWk59N@bvivekan-mobl \
    --to=balasubramani.vivekanandan@intel.com \
    --cc=haridhar.kalvala@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox