linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
@ 2025-06-16 17:51 Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 01/13] xfs: remove unused trace event xfs_attr_remove_iter_return Steven Rostedt
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong


Trace events take up to 5K in memory for text and meta data. I have code that
will trigger a warning when it detects unused tracepoints[1]. The XFS file
system contains many events that are not called. Most of them used to be called
but due to code refactoring the calls were removed but the trace events stayed
behind.

Some events were added but never used. If they were recent, I just reported
them, but if they were older, this series simply removes them.

One is called only when CONFIG_COMPACT is defined, so an #ifdef was placed
around it.

Finally, one event is supposed to be a trace event class, but was created with
the TRACE_EVENT() macro and not the DECLARE_EVENT_CLASS() macro. This works
because a TRACE_EVENT() is simply a DECLARE_EVENT_CLASS() and DEFINE_EVENT()
where the class and event have the same name. But as this was a mistake, the
event created should not exist.

[1] https://patchwork.kernel.org/project/linux-trace-kernel/cover/20250612235827.011358765@goodmis.org/

Changes since v1: https://lore.kernel.org/linux-trace-kernel/20250612212405.877692069@goodmis.org/

- Removed the first patch that mistakenly removed xfs_reflink_cow_found

- Change subjects to start with lowercase

- Removed xfs_attr events that are used in an #if 0 section instead of
  adding #if 0 around them

- I added: Reviewed-by: Christoph Hellwig <hch@lst.de>
  to all patches but the one with the modified #if 0 as Christoph
  said he looked at them all.

Steven Rostedt (13):
      xfs: remove unused trace event xfs_attr_remove_iter_return
      xfs: remove unused event xlog_iclog_want_sync
      xfs: remove unused event xfs_ioctl_clone
      xfs: remove unused xfs_reflink_compare_extents events
      xfs: remove unused trace event xfs_attr_rmtval_set
      xfs: remove unused xfs_attr events
      xfs: remove unused event xfs_attr_node_removename
      xfs: remove unused event xfs_alloc_near_error
      xfs: remove unused event xfs_alloc_near_nominleft
      xfs: remove unused event xfs_pagecache_inval
      xfs: remove usused xfs_end_io_direct events
      xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure
      xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()

----
 fs/xfs/scrub/trace.h |  2 +-
 fs/xfs/xfs_trace.h   | 68 ++--------------------------------------------------
 2 files changed, 3 insertions(+), 67 deletions(-)

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

* [PATCH v2 01/13] xfs: remove unused trace event xfs_attr_remove_iter_return
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 02/13] xfs: remove unused event xlog_iclog_want_sync Steven Rostedt
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the function xfs_attri_remove_iter was removed, it did not remove the
trace event that it called. As a trace event can take up to 5K of memory for
text and meta data regardless of if it is used or not, remove this unused trace
event.

Fixes: 59782a236b62 ("xfs: remove xfs_attri_remove_iter")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 01d284a1c759..a8867f62ba18 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -5077,7 +5077,6 @@ DEFINE_DAS_STATE_EVENT(xfs_attr_sf_addname_return);
 DEFINE_DAS_STATE_EVENT(xfs_attr_set_iter_return);
 DEFINE_DAS_STATE_EVENT(xfs_attr_leaf_addname_return);
 DEFINE_DAS_STATE_EVENT(xfs_attr_node_addname_return);
-DEFINE_DAS_STATE_EVENT(xfs_attr_remove_iter_return);
 DEFINE_DAS_STATE_EVENT(xfs_attr_rmtval_alloc);
 DEFINE_DAS_STATE_EVENT(xfs_attr_rmtval_remove_return);
 DEFINE_DAS_STATE_EVENT(xfs_attr_defer_add);
-- 
2.47.2



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

* [PATCH v2 02/13] xfs: remove unused event xlog_iclog_want_sync
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 01/13] xfs: remove unused trace event xfs_attr_remove_iter_return Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 03/13] xfs: remove unused event xfs_ioctl_clone Steven Rostedt
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

The trace event xlog_iclog_want_sync was added but never used. As trace
events can take up around 5K of memory in text and meta data regardless if
they are used or not, remove this unused event.

Fixes: 956f6daa84bf ("xfs: add iclog state trace events")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index a8867f62ba18..b78676f44750 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -5028,7 +5028,6 @@ DEFINE_ICLOG_EVENT(xlog_iclog_switch);
 DEFINE_ICLOG_EVENT(xlog_iclog_sync);
 DEFINE_ICLOG_EVENT(xlog_iclog_syncing);
 DEFINE_ICLOG_EVENT(xlog_iclog_sync_done);
-DEFINE_ICLOG_EVENT(xlog_iclog_want_sync);
 DEFINE_ICLOG_EVENT(xlog_iclog_wait_on);
 DEFINE_ICLOG_EVENT(xlog_iclog_write);
 
-- 
2.47.2



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

* [PATCH v2 03/13] xfs: remove unused event xfs_ioctl_clone
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 01/13] xfs: remove unused trace event xfs_attr_remove_iter_return Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 02/13] xfs: remove unused event xlog_iclog_want_sync Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 04/13] xfs: remove unused xfs_reflink_compare_extents events Steven Rostedt
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

The trace event xfs_ioctl_clone was added but never used. As trace events
can take up to 5K of memory in text and meta data regardless if they are
used or not, remove the unused trace event.

Fixes: 53aa1c34f4eb ("xfs: define tracepoints for reflink activities")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index b78676f44750..993397f4767c 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -4210,32 +4210,6 @@ DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_dest);
 DEFINE_DOUBLE_IO_EVENT(xfs_reflink_compare_extents);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error);
 
-/* ioctl tracepoints */
-TRACE_EVENT(xfs_ioctl_clone,
-	TP_PROTO(struct inode *src, struct inode *dest),
-	TP_ARGS(src, dest),
-	TP_STRUCT__entry(
-		__field(dev_t, dev)
-		__field(unsigned long, src_ino)
-		__field(loff_t, src_isize)
-		__field(unsigned long, dest_ino)
-		__field(loff_t, dest_isize)
-	),
-	TP_fast_assign(
-		__entry->dev = src->i_sb->s_dev;
-		__entry->src_ino = src->i_ino;
-		__entry->src_isize = i_size_read(src);
-		__entry->dest_ino = dest->i_ino;
-		__entry->dest_isize = i_size_read(dest);
-	),
-	TP_printk("dev %d:%d ino 0x%lx isize 0x%llx -> ino 0x%lx isize 0x%llx",
-		  MAJOR(__entry->dev), MINOR(__entry->dev),
-		  __entry->src_ino,
-		  __entry->src_isize,
-		  __entry->dest_ino,
-		  __entry->dest_isize)
-);
-
 /* unshare tracepoints */
 DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error);
-- 
2.47.2



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

* [PATCH v2 04/13] xfs: remove unused xfs_reflink_compare_extents events
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (2 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 03/13] xfs: remove unused event xfs_ioctl_clone Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 05/13] xfs: remove unused trace event xfs_attr_rmtval_set Steven Rostedt
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the clone/dedupe_file_rang common functions were refactored, it
removed the calls to the xfs_reflink_compare_extents and
xfs_reflink_compare_extents_error events. As each event can take up to 5K
in memory for text and meta data regardless if they are used or not, they
should not be created if they are not used. Remove these unused events.

Fixes: 876bec6f9bbf ("vfs: refactor clone/dedupe_file_range common functions")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 993397f4767c..6ba8cf1a52c5 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -4206,10 +4206,6 @@ DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_extent_error);
 DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_src);
 DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_dest);
 
-/* dedupe tracepoints */
-DEFINE_DOUBLE_IO_EVENT(xfs_reflink_compare_extents);
-DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error);
-
 /* unshare tracepoints */
 DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare);
 DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error);
-- 
2.47.2



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

* [PATCH v2 05/13] xfs: remove unused trace event xfs_attr_rmtval_set
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (3 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 04/13] xfs: remove unused xfs_reflink_compare_extents events Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 06/13] xfs: remove unused xfs_attr events Steven Rostedt
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the function xfs_attr_rmtval_set() was removed, the call to the
corresponding trace event was also removed but the trace event itself was
not. As trace events can take up to 5K of memory in text and meta data
regardless if they are used or not they should not be created when not
used. Remove the unused trace event.

Fixes: 0e6acf29db6f ("xfs: Remove xfs_attr_rmtval_set")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 6ba8cf1a52c5..f62afb388189 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2471,7 +2471,6 @@ DEFINE_ATTR_EVENT(xfs_attr_fillstate);
 DEFINE_ATTR_EVENT(xfs_attr_refillstate);
 
 DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
-DEFINE_ATTR_EVENT(xfs_attr_rmtval_set);
 
 #define DEFINE_DA_EVENT(name) \
 DEFINE_EVENT(xfs_da_class, name, \
-- 
2.47.2



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

* [PATCH v2 06/13] xfs: remove unused xfs_attr events
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (4 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 05/13] xfs: remove unused trace event xfs_attr_rmtval_set Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 07/13] xfs: remove unused event xfs_attr_node_removename Steven Rostedt
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

Trace events can take up to 5K in memory for text and meta data per event
regardless if they are used or not, so they should not be defined when not
used. The events xfs_attr_fillstate and xfs_attr_refillstate are only
called in code that is #ifdef out and exists only for future reference.

Remove these unused events. If the code is needed again, then git history
can recover what the events were.

Suggested-by: Christoph Hellwig <hch@lst.de>
Fixes: 59782a236b622 ("xfs: remove xfs_attri_remove_iter")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Changes since v1: https://lore.kernel.org/20250612212635.748779142@goodmis.org

- Remove the trace events from the header file instead of #if 0 them out.

 fs/xfs/xfs_trace.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index f62afb388189..d41513c76652 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2467,9 +2467,6 @@ DEFINE_ATTR_EVENT(xfs_attr_node_get);
 DEFINE_ATTR_EVENT(xfs_attr_node_replace);
 DEFINE_ATTR_EVENT(xfs_attr_node_removename);
 
-DEFINE_ATTR_EVENT(xfs_attr_fillstate);
-DEFINE_ATTR_EVENT(xfs_attr_refillstate);
-
 DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
 
 #define DEFINE_DA_EVENT(name) \
-- 
2.47.2



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

* [PATCH v2 07/13] xfs: remove unused event xfs_attr_node_removename
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (5 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 06/13] xfs: remove unused xfs_attr events Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 08/13] xfs: remove unused event xfs_alloc_near_error Steven Rostedt
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When xfs_attri_remove_iter() was removed, so was the call to the trace
event xfs_attr_node_removename. As trace events can take up to 5K in
memory for text and meta data regardless if they are used or not, they
should not be created when unused. Remove the unused event.

Fixes: 59782a236b622 ("xfs: remove xfs_attri_remove_iter")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index d41513c76652..41a46f7d3fd6 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2465,7 +2465,6 @@ DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall);
 DEFINE_ATTR_EVENT(xfs_attr_node_addname);
 DEFINE_ATTR_EVENT(xfs_attr_node_get);
 DEFINE_ATTR_EVENT(xfs_attr_node_replace);
-DEFINE_ATTR_EVENT(xfs_attr_node_removename);
 
 DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
 
-- 
2.47.2



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

* [PATCH v2 08/13] xfs: remove unused event xfs_alloc_near_error
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (6 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 07/13] xfs: remove unused event xfs_attr_node_removename Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 09/13] xfs: remove unused event xfs_alloc_near_nominleft Steven Rostedt
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

Trace events take up to 5K of memory in text and meta data regardless if
they are used or not. The call to the event xfs_alloc_near_error was
removed when the cursor data structure allocation was introduced. Remove
it as it is no longer used and is just wasting memory.

Fixes: f5e7dbea1e3e ("xfs: introduce allocation cursor data structure")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 41a46f7d3fd6..d4004e21d0c5 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2270,7 +2270,6 @@ DEFINE_ALLOC_EVENT(xfs_alloc_cur_right);
 DEFINE_ALLOC_EVENT(xfs_alloc_cur_left);
 DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup);
 DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup_done);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_error);
 DEFINE_ALLOC_EVENT(xfs_alloc_near_noentry);
 DEFINE_ALLOC_EVENT(xfs_alloc_near_busy);
 DEFINE_ALLOC_EVENT(xfs_alloc_size_neither);
-- 
2.47.2



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

* [PATCH v2 09/13] xfs: remove unused event xfs_alloc_near_nominleft
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (7 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 08/13] xfs: remove unused event xfs_alloc_near_error Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 10/13] xfs: remove unused event xfs_pagecache_inval Steven Rostedt
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the function xfs_alloc_space_available() was restructured, it removed
the only calls to the trace event xfs_alloc_near_nominleft. As trace
events take up to 5K of memory for text and meta data for each event, they
should not be created when not used. Remove this unused event.

Fixes: 54fee133ad59 ("xfs: adjust allocation length in xfs_alloc_space_available")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index d4004e21d0c5..e629ee44a9a1 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -2263,7 +2263,6 @@ DEFINE_EVENT(xfs_alloc_class, name, \
 DEFINE_ALLOC_EVENT(xfs_alloc_exact_done);
 DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound);
 DEFINE_ALLOC_EVENT(xfs_alloc_exact_error);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft);
 DEFINE_ALLOC_EVENT(xfs_alloc_near_first);
 DEFINE_ALLOC_EVENT(xfs_alloc_cur);
 DEFINE_ALLOC_EVENT(xfs_alloc_cur_right);
-- 
2.47.2



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

* [PATCH v2 10/13] xfs: remove unused event xfs_pagecache_inval
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (8 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 09/13] xfs: remove unused event xfs_alloc_near_nominleft Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 11/13] xfs: remove usused xfs_end_io_direct events Steven Rostedt
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the function xfs_flushinval_pages() was removed, it removed the only
caller to the trace event xfs_pagecache_inval. As trace events can take up
to 5K of memory in text and meta data each regardless if they are used or
not, they should not be created when unused. Remove the unused event.

Fixes: fb59581404ab ("xfs: remove xfs_flushinval_pages")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index e629ee44a9a1..098ef23598fe 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1893,31 +1893,6 @@ DEFINE_EVENT(xfs_itrunc_class, name, \
 DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_start);
 DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_end);
 
-TRACE_EVENT(xfs_pagecache_inval,
-	TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish),
-	TP_ARGS(ip, start, finish),
-	TP_STRUCT__entry(
-		__field(dev_t, dev)
-		__field(xfs_ino_t, ino)
-		__field(xfs_fsize_t, size)
-		__field(xfs_off_t, start)
-		__field(xfs_off_t, finish)
-	),
-	TP_fast_assign(
-		__entry->dev = VFS_I(ip)->i_sb->s_dev;
-		__entry->ino = ip->i_ino;
-		__entry->size = ip->i_disk_size;
-		__entry->start = start;
-		__entry->finish = finish;
-	),
-	TP_printk("dev %d:%d ino 0x%llx disize 0x%llx start 0x%llx finish 0x%llx",
-		  MAJOR(__entry->dev), MINOR(__entry->dev),
-		  __entry->ino,
-		  __entry->size,
-		  __entry->start,
-		  __entry->finish)
-);
-
 TRACE_EVENT(xfs_bunmap,
 	TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t fileoff, xfs_filblks_t len,
 		 int flags, unsigned long caller_ip),
-- 
2.47.2



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

* [PATCH v2 11/13] xfs: remove usused xfs_end_io_direct events
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (9 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 10/13] xfs: remove unused event xfs_pagecache_inval Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 12/13] xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure Steven Rostedt
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

When the use of iomap_dio_rw was added, the calls to the trace events
xfs_end_io_direct_unwritten and xfs_end_io_direct_append were removed but
those trace events were not. As trace events can take up to 5K in memory
for text and meta data regardless if they are used or not, they should not
be created when not used. Remove the unused events.

Fixes: acdda3aae146 ("xfs: use iomap_dio_rw")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 098ef23598fe..7977af7c6873 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1859,8 +1859,6 @@ DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
 DEFINE_SIMPLE_IO_EVENT(xfs_setfilesize);
 DEFINE_SIMPLE_IO_EVENT(xfs_zero_eof);
 DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write);
-DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_unwritten);
-DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_append);
 DEFINE_SIMPLE_IO_EVENT(xfs_file_splice_read);
 DEFINE_SIMPLE_IO_EVENT(xfs_zoned_map_blocks);
 
-- 
2.47.2



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

* [PATCH v2 12/13] xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (10 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 11/13] xfs: remove usused xfs_end_io_direct events Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 17:51 ` [PATCH v2 13/13] xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS() Steven Rostedt
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

The trace event xfs_file_compat_ioctl is only used when CONFIG_COMPAT is
configured in the build. As trace events can take up to 5K in memory for
text and meta data regardless if they are used, they should not be created
when unused. Add #ifdef CONFIG_COMPAT around the event so that it is only
created when that is configured.

Fixes: cca28fb83d9e6 ("xfs: split xfs_itrace_entry")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/xfs_trace.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 7977af7c6873..448dea97a052 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1083,7 +1083,9 @@ DEFINE_INODE_EVENT(xfs_get_acl);
 #endif
 DEFINE_INODE_EVENT(xfs_vm_bmap);
 DEFINE_INODE_EVENT(xfs_file_ioctl);
+#ifdef CONFIG_COMPAT
 DEFINE_INODE_EVENT(xfs_file_compat_ioctl);
+#endif
 DEFINE_INODE_EVENT(xfs_ioctl_setattr);
 DEFINE_INODE_EVENT(xfs_dir_fsync);
 DEFINE_INODE_EVENT(xfs_file_fsync);
-- 
2.47.2



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

* [PATCH v2 13/13] xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (11 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 12/13] xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure Steven Rostedt
@ 2025-06-16 17:51 ` Steven Rostedt
  2025-06-16 19:18 ` [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
  2025-07-08 22:09 ` Steven Rostedt
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 17:51 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong

From: Steven Rostedt <rostedt@goodmis.org>

xfs_xattr_class was accidentally created as a TRACE_EVENT() instead of a
class with DECLARE_EVENT_CLASS().

Note, TRACE_EVENT() is just defined as:

 #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
	DECLARE_EVENT_CLASS(name,			       \
			     PARAMS(proto),		       \
			     PARAMS(args),		       \
			     PARAMS(tstruct),		       \
			     PARAMS(assign),		       \
			     PARAMS(print));		       \
	DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));

The difference between TRACE_EVENT() and DECLARE_EVENT_CLASS() is that
TRACE_EVENT() also creates an event with the class name.

Switch xfs_xattr_class over to being a class and not an event as it is not
called directly, and that event with the class name takes up unnecessary
memory.

Fixes: e47dcf113ae3 ("xfs: repair extended attributes")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 fs/xfs/scrub/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h
index d7c4ced47c15..1e6e9c10cea2 100644
--- a/fs/xfs/scrub/trace.h
+++ b/fs/xfs/scrub/trace.h
@@ -2996,7 +2996,7 @@ DEFINE_EVENT(xrep_pptr_salvage_class, name, \
 DEFINE_XREP_PPTR_SALVAGE_EVENT(xrep_xattr_salvage_pptr);
 DEFINE_XREP_PPTR_SALVAGE_EVENT(xrep_xattr_insert_pptr);
 
-TRACE_EVENT(xrep_xattr_class,
+DECLARE_EVENT_CLASS(xrep_xattr_class,
 	TP_PROTO(struct xfs_inode *ip, struct xfs_inode *arg_ip),
 	TP_ARGS(ip, arg_ip),
 	TP_STRUCT__entry(
-- 
2.47.2



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

* Re: [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (12 preceding siblings ...)
  2025-06-16 17:51 ` [PATCH v2 13/13] xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS() Steven Rostedt
@ 2025-06-16 19:18 ` Steven Rostedt
  2025-07-08 22:09 ` Steven Rostedt
  14 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-06-16 19:18 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong


Bah, I hate the multiple clipboards of the Linux desktop. I had cut and
pasted the above subject line in one clipboard and then cut the subject
I wanted in another, and unfortunately pasted the former :-p

This is what the subject was supposed to be:

  "xfs: remove unused trace events"


On Mon, 16 Jun 2025 13:51:46 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> Trace events take up to 5K in memory for text and meta data. I have code that
> will trigger a warning when it detects unused tracepoints[1]. The XFS file
> system contains many events that are not called. Most of them used to be called
> but due to code refactoring the calls were removed but the trace events stayed
> behind.
> 
> Some events were added but never used. If they were recent, I just reported
> them, but if they were older, this series simply removes them.
> 
> One is called only when CONFIG_COMPACT is defined, so an #ifdef was placed
> around it.
> 
> Finally, one event is supposed to be a trace event class, but was created with
> the TRACE_EVENT() macro and not the DECLARE_EVENT_CLASS() macro. This works
> because a TRACE_EVENT() is simply a DECLARE_EVENT_CLASS() and DEFINE_EVENT()
> where the class and event have the same name. But as this was a mistake, the
> event created should not exist.
> 
> [1] https://patchwork.kernel.org/project/linux-trace-kernel/cover/20250612235827.011358765@goodmis.org/
> 
> Changes since v1: https://lore.kernel.org/linux-trace-kernel/20250612212405.877692069@goodmis.org/

And this should have been to the lore link and not patchwork:

  https://lore.kernel.org/linux-trace-kernel/20250612235827.011358765@goodmis.org/

-- Steve

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

* Re: [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
  2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
                   ` (13 preceding siblings ...)
  2025-06-16 19:18 ` [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
@ 2025-07-08 22:09 ` Steven Rostedt
  2025-07-09  7:52   ` Carlos Maiolino
  2025-07-09  7:54   ` Carlos Maiolino
  14 siblings, 2 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-07-08 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-xfs
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Carlos Maiolino, Christoph Hellwig, Darrick J. Wong


Should this go through the XFS tree, or should I take it?

-- Steve


On Mon, 16 Jun 2025 13:51:46 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> Trace events take up to 5K in memory for text and meta data. I have code that
> will trigger a warning when it detects unused tracepoints[1]. The XFS file
> system contains many events that are not called. Most of them used to be called
> but due to code refactoring the calls were removed but the trace events stayed
> behind.
> 
> Some events were added but never used. If they were recent, I just reported
> them, but if they were older, this series simply removes them.
> 
> One is called only when CONFIG_COMPACT is defined, so an #ifdef was placed
> around it.
> 
> Finally, one event is supposed to be a trace event class, but was created with
> the TRACE_EVENT() macro and not the DECLARE_EVENT_CLASS() macro. This works
> because a TRACE_EVENT() is simply a DECLARE_EVENT_CLASS() and DEFINE_EVENT()
> where the class and event have the same name. But as this was a mistake, the
> event created should not exist.
> 
> [1] https://patchwork.kernel.org/project/linux-trace-kernel/cover/20250612235827.011358765@goodmis.org/
> 
> Changes since v1: https://lore.kernel.org/linux-trace-kernel/20250612212405.877692069@goodmis.org/
> 
> - Removed the first patch that mistakenly removed xfs_reflink_cow_found
> 
> - Change subjects to start with lowercase
> 
> - Removed xfs_attr events that are used in an #if 0 section instead of
>   adding #if 0 around them
> 
> - I added: Reviewed-by: Christoph Hellwig <hch@lst.de>
>   to all patches but the one with the modified #if 0 as Christoph
>   said he looked at them all.
> 
> Steven Rostedt (13):
>       xfs: remove unused trace event xfs_attr_remove_iter_return
>       xfs: remove unused event xlog_iclog_want_sync
>       xfs: remove unused event xfs_ioctl_clone
>       xfs: remove unused xfs_reflink_compare_extents events
>       xfs: remove unused trace event xfs_attr_rmtval_set
>       xfs: remove unused xfs_attr events
>       xfs: remove unused event xfs_attr_node_removename
>       xfs: remove unused event xfs_alloc_near_error
>       xfs: remove unused event xfs_alloc_near_nominleft
>       xfs: remove unused event xfs_pagecache_inval
>       xfs: remove usused xfs_end_io_direct events
>       xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure
>       xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()
> 
> ----
>  fs/xfs/scrub/trace.h |  2 +-
>  fs/xfs/xfs_trace.h   | 68 ++--------------------------------------------------
>  2 files changed, 3 insertions(+), 67 deletions(-)


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

* Re: [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
  2025-07-08 22:09 ` Steven Rostedt
@ 2025-07-09  7:52   ` Carlos Maiolino
  2025-07-09  7:54   ` Carlos Maiolino
  1 sibling, 0 replies; 19+ messages in thread
From: Carlos Maiolino @ 2025-07-09  7:52 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, linux-trace-kernel, linux-xfs, Masami Hiramatsu,
	Mark Rutland, Mathieu Desnoyers, Andrew Morton, Christoph Hellwig,
	Darrick J. Wong

On Tue, Jul 08, 2025 at 06:09:32PM -0400, Steven Rostedt wrote:
> 
> Should this go through the XFS tree, or should I take it?

This is in XFS tree for a while now:

https://web.git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/?h=xfs-6.17-merge

https://lore.kernel.org/linux-xfs/aF6a1GhCdT_llDSm@infradead.org/T/#mae0757697a557087c723de553b7ccd2bb7a39c9c


Carlos

> 
> -- Steve
> 
> 
> On Mon, 16 Jun 2025 13:51:46 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Trace events take up to 5K in memory for text and meta data. I have code that
> > will trigger a warning when it detects unused tracepoints[1]. The XFS file
> > system contains many events that are not called. Most of them used to be called
> > but due to code refactoring the calls were removed but the trace events stayed
> > behind.
> >
> > Some events were added but never used. If they were recent, I just reported
> > them, but if they were older, this series simply removes them.
> >
> > One is called only when CONFIG_COMPACT is defined, so an #ifdef was placed
> > around it.
> >
> > Finally, one event is supposed to be a trace event class, but was created with
> > the TRACE_EVENT() macro and not the DECLARE_EVENT_CLASS() macro. This works
> > because a TRACE_EVENT() is simply a DECLARE_EVENT_CLASS() and DEFINE_EVENT()
> > where the class and event have the same name. But as this was a mistake, the
> > event created should not exist.
> >
> > [1] https://patchwork.kernel.org/project/linux-trace-kernel/cover/20250612235827.011358765@goodmis.org/
> >
> > Changes since v1: https://lore.kernel.org/linux-trace-kernel/20250612212405.877692069@goodmis.org/
> >
> > - Removed the first patch that mistakenly removed xfs_reflink_cow_found
> >
> > - Change subjects to start with lowercase
> >
> > - Removed xfs_attr events that are used in an #if 0 section instead of
> >   adding #if 0 around them
> >
> > - I added: Reviewed-by: Christoph Hellwig <hch@lst.de>
> >   to all patches but the one with the modified #if 0 as Christoph
> >   said he looked at them all.
> >
> > Steven Rostedt (13):
> >       xfs: remove unused trace event xfs_attr_remove_iter_return
> >       xfs: remove unused event xlog_iclog_want_sync
> >       xfs: remove unused event xfs_ioctl_clone
> >       xfs: remove unused xfs_reflink_compare_extents events
> >       xfs: remove unused trace event xfs_attr_rmtval_set
> >       xfs: remove unused xfs_attr events
> >       xfs: remove unused event xfs_attr_node_removename
> >       xfs: remove unused event xfs_alloc_near_error
> >       xfs: remove unused event xfs_alloc_near_nominleft
> >       xfs: remove unused event xfs_pagecache_inval
> >       xfs: remove usused xfs_end_io_direct events
> >       xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure
> >       xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()
> >
> > ----
> >  fs/xfs/scrub/trace.h |  2 +-
> >  fs/xfs/xfs_trace.h   | 68 ++--------------------------------------------------
> >  2 files changed, 3 insertions(+), 67 deletions(-)
> 

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

* Re: [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
  2025-07-08 22:09 ` Steven Rostedt
  2025-07-09  7:52   ` Carlos Maiolino
@ 2025-07-09  7:54   ` Carlos Maiolino
  2025-07-09 14:55     ` Steven Rostedt
  1 sibling, 1 reply; 19+ messages in thread
From: Carlos Maiolino @ 2025-07-09  7:54 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, linux-trace-kernel, linux-xfs, Masami Hiramatsu,
	Mark Rutland, Mathieu Desnoyers, Andrew Morton, Christoph Hellwig,
	Darrick J. Wong

On Tue, Jul 08, 2025 at 06:09:32PM -0400, Steven Rostedt wrote:
> 
> Should this go through the XFS tree, or should I take it?

FWIW, I just realized that for whatever reason b4 chocked to send a
'Thank You' msg to you when I applied your patches. It sent to every
submitter but you. That's why you didn't receive a 'personal' thanks :)

> 
> -- Steve
> 
> 
> On Mon, 16 Jun 2025 13:51:46 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Trace events take up to 5K in memory for text and meta data. I have code that
> > will trigger a warning when it detects unused tracepoints[1]. The XFS file
> > system contains many events that are not called. Most of them used to be called
> > but due to code refactoring the calls were removed but the trace events stayed
> > behind.
> >
> > Some events were added but never used. If they were recent, I just reported
> > them, but if they were older, this series simply removes them.
> >
> > One is called only when CONFIG_COMPACT is defined, so an #ifdef was placed
> > around it.
> >
> > Finally, one event is supposed to be a trace event class, but was created with
> > the TRACE_EVENT() macro and not the DECLARE_EVENT_CLASS() macro. This works
> > because a TRACE_EVENT() is simply a DECLARE_EVENT_CLASS() and DEFINE_EVENT()
> > where the class and event have the same name. But as this was a mistake, the
> > event created should not exist.
> >
> > [1] https://patchwork.kernel.org/project/linux-trace-kernel/cover/20250612235827.011358765@goodmis.org/
> >
> > Changes since v1: https://lore.kernel.org/linux-trace-kernel/20250612212405.877692069@goodmis.org/
> >
> > - Removed the first patch that mistakenly removed xfs_reflink_cow_found
> >
> > - Change subjects to start with lowercase
> >
> > - Removed xfs_attr events that are used in an #if 0 section instead of
> >   adding #if 0 around them
> >
> > - I added: Reviewed-by: Christoph Hellwig <hch@lst.de>
> >   to all patches but the one with the modified #if 0 as Christoph
> >   said he looked at them all.
> >
> > Steven Rostedt (13):
> >       xfs: remove unused trace event xfs_attr_remove_iter_return
> >       xfs: remove unused event xlog_iclog_want_sync
> >       xfs: remove unused event xfs_ioctl_clone
> >       xfs: remove unused xfs_reflink_compare_extents events
> >       xfs: remove unused trace event xfs_attr_rmtval_set
> >       xfs: remove unused xfs_attr events
> >       xfs: remove unused event xfs_attr_node_removename
> >       xfs: remove unused event xfs_alloc_near_error
> >       xfs: remove unused event xfs_alloc_near_nominleft
> >       xfs: remove unused event xfs_pagecache_inval
> >       xfs: remove usused xfs_end_io_direct events
> >       xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure
> >       xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS()
> >
> > ----
> >  fs/xfs/scrub/trace.h |  2 +-
> >  fs/xfs/xfs_trace.h   | 68 ++--------------------------------------------------
> >  2 files changed, 3 insertions(+), 67 deletions(-)
> 

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

* Re: [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found
  2025-07-09  7:54   ` Carlos Maiolino
@ 2025-07-09 14:55     ` Steven Rostedt
  0 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2025-07-09 14:55 UTC (permalink / raw)
  To: Carlos Maiolino
  Cc: linux-kernel, linux-trace-kernel, linux-xfs, Masami Hiramatsu,
	Mark Rutland, Mathieu Desnoyers, Andrew Morton, Christoph Hellwig,
	Darrick J. Wong

On Wed, 9 Jul 2025 09:54:37 +0200
Carlos Maiolino <cem@kernel.org> wrote:

> On Tue, Jul 08, 2025 at 06:09:32PM -0400, Steven Rostedt wrote:
> > 
> > Should this go through the XFS tree, or should I take it?  
> 
> FWIW, I just realized that for whatever reason b4 chocked to send a
> 'Thank You' msg to you when I applied your patches. It sent to every
> submitter but you. That's why you didn't receive a 'personal' thanks :)

Ah, OK. Well, thanks, I think ;-)

-- Steve

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

end of thread, other threads:[~2025-07-09 14:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 17:51 [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 01/13] xfs: remove unused trace event xfs_attr_remove_iter_return Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 02/13] xfs: remove unused event xlog_iclog_want_sync Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 03/13] xfs: remove unused event xfs_ioctl_clone Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 04/13] xfs: remove unused xfs_reflink_compare_extents events Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 05/13] xfs: remove unused trace event xfs_attr_rmtval_set Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 06/13] xfs: remove unused xfs_attr events Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 07/13] xfs: remove unused event xfs_attr_node_removename Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 08/13] xfs: remove unused event xfs_alloc_near_error Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 09/13] xfs: remove unused event xfs_alloc_near_nominleft Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 10/13] xfs: remove unused event xfs_pagecache_inval Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 11/13] xfs: remove usused xfs_end_io_direct events Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 12/13] xfs: only create event xfs_file_compat_ioctl when CONFIG_COMPAT is configure Steven Rostedt
2025-06-16 17:51 ` [PATCH v2 13/13] xfs: change xfs_xattr_class from a TRACE_EVENT() to DECLARE_EVENT_CLASS() Steven Rostedt
2025-06-16 19:18 ` [PATCH v2 00/13] xfs: tracing: remove unused event xfs_reflink_cow_found Steven Rostedt
2025-07-08 22:09 ` Steven Rostedt
2025-07-09  7:52   ` Carlos Maiolino
2025-07-09  7:54   ` Carlos Maiolino
2025-07-09 14:55     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).