[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250403110615.7a51b793@gandalf.local.home>
Date: Thu, 3 Apr 2025 11:06:15 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Andrii Nakryiko <andrii@...nel.org>, linux-trace-kernel@...r.kernel.org,
peterz@...radead.org, bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com, mhocko@...nel.org, oleg@...hat.com,
brauner@...nel.org, glider@...gle.com, mhiramat@...nel.org,
mathieu.desnoyers@...icios.com, akpm@...ux-foundation.org
Subject: Re: [PATCH v2] exit: move and extend sched_process_exit()
tracepoint
On Thu, 3 Apr 2025 15:54:22 +0200
Ingo Molnar <mingo@...nel.org> wrote:
> This feels really fragile, could you please at least add a comment that
> points out that this is basically an extension of
> sched_process_template, and that it should remain a subset of it, or
> something to that end?
Is there any dependency on this?
The reason to use the templates is because it saves memory. Each
TRACE_EVENT() can add ~5k (which a TRACE_EVENT() is really just a
DECLARE_EVENT_CLASS() + DEFINE_EVENT() for a single event).
Each DEFINE_EVENT() just adds around 250 bytes. Hence, if you have multiple
events that share the same fields and output, it's much more memory
efficient to use the CLASS and EVENT logic then making each their own
TRACE_EVENT().
I don't know of any other dependency to why this was a template other than
to save memory.
-- Steve
Powered by blists - more mailing lists