All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint
@ 2026-11-02 18:41 Torra Sowmya
  2026-11-03 11:05 ` Sowmya Torra
  2026-11-07 18:41 ` Steven Rostedt
  0 siblings, 2 replies; 4+ messages in thread
From: Torra Sowmya @ 2026-11-02 18:41 UTC (permalink / raw)
  To: outreachy; +Cc: rostedt, julianbraha, julia.lawall

Commit f3e9b1f43458 ("drm/xe: Remove async worker and rework sync
binds") removed the async worker and its calls to
trace_xe_vma_flush(), leaving the event definition unused.

Remove the definition from xe_trace_bo.h to avoid generating code
and data for an event with no remaining callers.

With the tested x86-64 configuration, size reports a reduction of
452 bytes in xe_trace_bo.o, from 20262 to 19810 bytes: 156 bytes
in text and 296 bytes in data.

Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
---
 drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h b/drivers/gpu/drm/xe/xe_trace_bo.h
index 86323cf3be2c..72c4107adc13 100644
--- a/drivers/gpu/drm/xe/xe_trace_bo.h
+++ b/drivers/gpu/drm/xe/xe_trace_bo.h
@@ -115,11 +115,6 @@ DECLARE_EVENT_CLASS(xe_vma,
 			      __entry->end, __entry->ptr)
 )
 
-DEFINE_EVENT(xe_vma, xe_vma_flush,
-	     TP_PROTO(struct xe_vma *vma),
-	     TP_ARGS(vma)
-);
-
 DEFINE_EVENT(xe_vma, xe_vma_pagefault,
 	     TP_PROTO(struct xe_vma *vma),
 	     TP_ARGS(vma)
-- 
2.47.3


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

* Re: [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint
  2026-11-02 18:41 [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint Torra Sowmya
@ 2026-11-03 11:05 ` Sowmya Torra
  2026-11-07 18:38   ` Steven Rostedt
  2026-11-07 18:41 ` Steven Rostedt
  1 sibling, 1 reply; 4+ messages in thread
From: Sowmya Torra @ 2026-11-03 11:05 UTC (permalink / raw)
  To: outreachy; +Cc: rostedt, julianbraha, julia.lawall

Hello everyone,

I have a small question about measuring memory savings for tracepoint
cleanup patches.

For my `xe_vma_flush` patch, I compared `xe_trace_bo.o` before and
after the change using the `size` command and found a reduction of 452
bytes.

I measured the compiled object file, not the actual memory usage when
the module is loaded. Is this measurement enough, or should I also
check the size of the final `.ko` module or measure the runtime memory
usage?

I just wanted to make sure I'm measuring it the right way.

BestRegards,
Sowmya

On Tue, Nov 3, 2026 at 12:14 AM Torra Sowmya <sowmyatorra@gmail.com> wrote:
>
> Commit f3e9b1f43458 ("drm/xe: Remove async worker and rework sync
> binds") removed the async worker and its calls to
> trace_xe_vma_flush(), leaving the event definition unused.
>
> Remove the definition from xe_trace_bo.h to avoid generating code
> and data for an event with no remaining callers.
>
> With the tested x86-64 configuration, size reports a reduction of
> 452 bytes in xe_trace_bo.o, from 20262 to 19810 bytes: 156 bytes
> in text and 296 bytes in data.
>
> Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
> ---
>  drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h b/drivers/gpu/drm/xe/xe_trace_bo.h
> index 86323cf3be2c..72c4107adc13 100644
> --- a/drivers/gpu/drm/xe/xe_trace_bo.h
> +++ b/drivers/gpu/drm/xe/xe_trace_bo.h
> @@ -115,11 +115,6 @@ DECLARE_EVENT_CLASS(xe_vma,
>                               __entry->end, __entry->ptr)
>  )
>
> -DEFINE_EVENT(xe_vma, xe_vma_flush,
> -            TP_PROTO(struct xe_vma *vma),
> -            TP_ARGS(vma)
> -);
> -
>  DEFINE_EVENT(xe_vma, xe_vma_pagefault,
>              TP_PROTO(struct xe_vma *vma),
>              TP_ARGS(vma)
> --
> 2.47.3
>

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

* Re: [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint
  2026-11-03 11:05 ` Sowmya Torra
@ 2026-11-07 18:38   ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2026-11-07 18:38 UTC (permalink / raw)
  To: Sowmya Torra; +Cc: outreachy, julianbraha, julia.lawall

On Tue, 3 Nov 2026 16:35:44 +0530
Sowmya Torra <sowmyatorra@gmail.com> wrote:

> Hello everyone,
> 
> I have a small question about measuring memory savings for tracepoint
> cleanup patches.
> 
> For my `xe_vma_flush` patch, I compared `xe_trace_bo.o` before and
> after the change using the `size` command and found a reduction of 452
> bytes.
> 
> I measured the compiled object file, not the actual memory usage when
> the module is loaded. Is this measurement enough, or should I also
> check the size of the final `.ko` module or measure the runtime memory
> usage?
> 
> I just wanted to make sure I'm measuring it the right way.

You are correct.

The 5K measurement is for TRACE_EVENT() which is really defined as:

#define TRACE_EVENT(foo..) DECLARE_EVENT_CLASS(foo, ...) DEFINE_EVENT(foo, ...)

where most of the heavy lifting is in that DECLARE_EVENT_CLASS(). I
created a way to split up events when they had the same info so that
each event didn't re-define the same code over and over.

Hence, TRACE_EVENT() is around 5K where each DEFINE_EVENT() is much
less, and can vary depending on configs.

-- Steve


> 
> BestRegards,
> Sowmya
> 
> On Tue, Nov 3, 2026 at 12:14 AM Torra Sowmya <sowmyatorra@gmail.com> wrote:
> >
> > Commit f3e9b1f43458 ("drm/xe: Remove async worker and rework sync
> > binds") removed the async worker and its calls to
> > trace_xe_vma_flush(), leaving the event definition unused.
> >
> > Remove the definition from xe_trace_bo.h to avoid generating code
> > and data for an event with no remaining callers.
> >
> > With the tested x86-64 configuration, size reports a reduction of
> > 452 bytes in xe_trace_bo.o, from 20262 to 19810 bytes: 156 bytes
> > in text and 296 bytes in data.
> >
> > Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
> > ---
> >  drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
> >  1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h b/drivers/gpu/drm/xe/xe_trace_bo.h
> > index 86323cf3be2c..72c4107adc13 100644
> > --- a/drivers/gpu/drm/xe/xe_trace_bo.h
> > +++ b/drivers/gpu/drm/xe/xe_trace_bo.h
> > @@ -115,11 +115,6 @@ DECLARE_EVENT_CLASS(xe_vma,
> >                               __entry->end, __entry->ptr)
> >  )
> >
> > -DEFINE_EVENT(xe_vma, xe_vma_flush,
> > -            TP_PROTO(struct xe_vma *vma),
> > -            TP_ARGS(vma)
> > -);
> > -
> >  DEFINE_EVENT(xe_vma, xe_vma_pagefault,
> >              TP_PROTO(struct xe_vma *vma),
> >              TP_ARGS(vma)
> > --
> > 2.47.3
> >  


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

* Re: [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint
  2026-11-02 18:41 [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint Torra Sowmya
  2026-11-03 11:05 ` Sowmya Torra
@ 2026-11-07 18:41 ` Steven Rostedt
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2026-11-07 18:41 UTC (permalink / raw)
  To: Torra Sowmya; +Cc: outreachy, julianbraha, julia.lawall

On Tue,  3 Nov 2026 00:11:48 +0530
Torra Sowmya <sowmyatorra@gmail.com> wrote:

> Commit f3e9b1f43458 ("drm/xe: Remove async worker and rework sync
> binds") removed the async worker and its calls to
> trace_xe_vma_flush(), leaving the event definition unused.
> 
> Remove the definition from xe_trace_bo.h to avoid generating code
> and data for an event with no remaining callers.
> 
> With the tested x86-64 configuration, size reports a reduction of
> 452 bytes in xe_trace_bo.o, from 20262 to 19810 bytes: 156 bytes
> in text and 296 bytes in data.

Since this event and the events in your previous patch were removed by
the same commit, please fold the two patches into one.

We want to remove events that their uses were removed together.

Thanks,

-- Steve


> 
> Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
> ---
>  drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h b/drivers/gpu/drm/xe/xe_trace_bo.h
> index 86323cf3be2c..72c4107adc13 100644
> --- a/drivers/gpu/drm/xe/xe_trace_bo.h
> +++ b/drivers/gpu/drm/xe/xe_trace_bo.h
> @@ -115,11 +115,6 @@ DECLARE_EVENT_CLASS(xe_vma,
>  			      __entry->end, __entry->ptr)
>  )
>  
> -DEFINE_EVENT(xe_vma, xe_vma_flush,
> -	     TP_PROTO(struct xe_vma *vma),
> -	     TP_ARGS(vma)
> -);
> -
>  DEFINE_EVENT(xe_vma, xe_vma_pagefault,
>  	     TP_PROTO(struct xe_vma *vma),
>  	     TP_ARGS(vma)


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

end of thread, other threads:[~2026-11-07 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 18:41 [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint Torra Sowmya
2026-11-03 11:05 ` Sowmya Torra
2026-11-07 18:38   ` Steven Rostedt
2026-11-07 18:41 ` Steven Rostedt

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.