Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

Steven Rostedt
2020-06-28T19:00:23Z

On Sun, 28 Jun 2020 14:46:16 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> > We added a bunch of code to libbcc in the past to support instances,
> > but eventually removed it all due to memory overhead per instance.
> > If I recall it was ~8Mbyte per instance. That was couple years ago.
>
> I'd like to see where that 8 MB per instance came from. You can control
> the size of the instance buffers. If size is still an issue, I'll be
> happy to work with you to fix it.

Looks to be the duplication of the event directory tree. There's a lot
of duplicate data there. Instead of just punting and saying "instances
are too large" perhaps you could get someone to look at a way to
consolidate that data? I'm sure there's a lot of ways to help here.

Or you can just create a new event called bpf_printk() that passes in
and records a string and enable that automatically when a bpf module
has it. That could work as well.

In either case, your use of trace_printk() is an abuse of its purpose.

-- Steve