All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Sowmya Torra <sowmyatorra@gmail.com>
Cc: outreachy@lists.linux.dev, julianbraha@gmail.com, julia.lawall@inria.fr
Subject: Re: [PATCH] drm/xe: Remove unused xe_vma_flush tracepoint
Date: Sat, 7 Nov 2026 13:38:07 -0500	[thread overview]
Message-ID: <20261107133807.41daf214@fedora> (raw)
In-Reply-To: <CAFsBPPnWjgKNw0rzaG6TbShNJO6t6NKq_YXMQ65FCyB8Wqt7pg@mail.gmail.com>

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
> >  


  reply	other threads:[~2026-11-07 18:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-11-07 18:41 ` Steven Rostedt

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=20261107133807.41daf214@fedora \
    --to=rostedt@goodmis.org \
    --cc=julia.lawall@inria.fr \
    --cc=julianbraha@gmail.com \
    --cc=outreachy@lists.linux.dev \
    --cc=sowmyatorra@gmail.com \
    /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 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.