Re: [PATCH v2] exit: move and extend sched_process_exit() tracepoint

From: Andrii Nakryiko
Date: Thu Apr 03 2025 - 12:02:32 EST


On Thu, Apr 3, 2025 at 8:12 AM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
>
> * Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > On Thu, 3 Apr 2025 15:54:22 +0200
> > Ingo Molnar <mingo@xxxxxxxxxx> 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?
> >
> > I don't know of any other dependency to why this was a template other than
> > to save memory.
>
> Uhm, to state the obvious: to not replicate the same definitions over
> and over again three times times, for 3 scheduler tracepoints that
> share the record format?
>
> Removing just a single sched_process_template use bloats the source and
> adds in potential fragility:
>
> 2 files changed, 26 insertions(+), 4 deletions(-)
>
> So my request is to please at least add a comment that points the
> reader to the shared record format between sched_process_exit and the
> other two tracepoints.

Sounds good, no problem. I'll send a follow up patch which Andrew can
fold, if he prefers.

>
> Thanks,
>
> Ingo