fs/xfs/scrub/trace.h | 2 +- fs/xfs/xfs_trace.h | 68 ++-------------------------------------------------- 2 files changed, 3 insertions(+), 67 deletions(-)
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(-)
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
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(-)
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(-) >
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
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(-) >
© 2016 - 2025 Red Hat, Inc.