Re: [PATCH 00/14] xfs: Remove unused trace events

From: Christoph Hellwig
Date: Mon Jun 16 2025 - 01:31:31 EST


On Fri, Jun 13, 2025 at 11:31:19AM -0400, Steven Rostedt wrote:
> On Fri, 13 Jun 2025 08:08:55 -0700
> "Darrick J. Wong" <djwong@xxxxxxxxxx> wrote:
>
> > On Thu, Jun 12, 2025 at 05:24:05PM -0400, Steven Rostedt wrote:
> > >
> > > Trace events take up to 5K in memory for text and meta data. I have code that
> >
> > Under what circumstances do they eat up that much memory? And is that
> > per-class? Or per-tracepoint?
>
> I just did an analysis of this:
>
> https://lore.kernel.org/lkml/20250613104240.509ff13c@xxxxxxxxxxxxxxxxx/T/#md81abade0df19ba9062fd51ced4458161f885ac3
>
> A TRACE_EVENT() is about 5K, and each DEFINE_EVENT() is about 1K.

That's really quite expensive. And you only measured the tezt/data/bss
overhead and not even the dynamic memory overhead, which is probably
a lot more.