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" <djw...@kernel.org> 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.509ff...@batman.local.home/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.