Skip to contentSkip to conversation

drm/xe: Remove unused xe_vma_flush tracepoint

PATCH In review Torra Sowmya 2 participants 4 messages Nov 2 – Nov 7

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/xe: Remove unused xe_vma_flush tracepoint

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.

---
 drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/xe/xe_trace_bo.h +0 -5
index 86323cf3be2c..72c4107adc13 100644
@@ -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)
Signature · 1 line
2.47.3
#1 lore raw

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

Quoted 36 lines · Torra Sowmya

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.

---
 drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/xe/xe_trace_bo.h +0 -6
index 86323cf3be2c..72c4107adc13 100644
@@ -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

#2 lore raw
Quoted 9 lines · On Tue, 3 Nov 2026 16:35:44 +0530 Sowmya Torra <[email protected]> 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.

Quoted 6 lines

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

Quoted 41 lines

BestRegards,
Sowmya

Quoted 36 lines · Torra Sowmya

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.

---
 drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/xe/xe_trace_bo.h +0 -6
index 86323cf3be2c..72c4107adc13 100644
@@ -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

#3 lore raw
In reply to Torra Sowmya
Quoted 10 lines · On Tue, 3 Nov 2026 00:11:48 +0530 Torra Sowmya <[email protected]> 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

Quoted 22 lines
---
 drivers/gpu/drm/xe/xe_trace_bo.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/xe/xe_trace_bo.h +0 -5
index 86323cf3be2c..72c4107adc13 100644
@@ -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)