From: Breno Leitao <leitao@debian.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Christian Brauner <brauner@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.cz>, Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org,
kernel-team@meta.com, Andrii Nakryiko <andrii@kernel.org>
Subject: Re: [PATCH] coredump: add tracepoint for coredump events
Date: Mon, 23 Mar 2026 04:41:02 -0700 [thread overview]
Message-ID: <acEmBRXmUqFc8fcz@gmail.com> (raw)
In-Reply-To: <20260320144834.079ba241@gandalf.local.home>
On Fri, Mar 20, 2026 at 02:48:34PM -0400, Steven Rostedt wrote:
> On Fri, 20 Mar 2026 14:21:23 +0100
> Christian Brauner <brauner@kernel.org> wrote:
>
> > > +TRACE_EVENT(coredump,
> > > +
> > > + TP_PROTO(int sig),
> > > +
> > > + TP_ARGS(sig),
> > > +
> > > + TP_STRUCT__entry(
> > > + __field(int, sig)
> > > + __array(char, comm, TASK_COMM_LEN)
> > > + __field(pid_t, pid)
> > > + ),
> > > +
> > > + TP_fast_assign(
> > > + __entry->sig = sig;
> > > + memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
> > > + __entry->pid = current->pid;
> >
> > That's the TID as seen in the global pid namespace.
> > I assume this is what you want but worth noting.
>
> Not to mention the pid is saved in all trace events and is available for
> perf and bpf too. Even the change log showed it:
>
> sleep-634 [036] ..... 145.222206: coredump: sig=11 comm=sleep pid=634
>
> ^^^ ^^^
>
> So it should not be included. It's duplicate and only wastes space. Now if
> you wanted to save the name space pid, that may be useful.
In my use case, I don't need the namespace pid since I'm primarily
focused on system-wide monitoring, and the global pid is sufficient
for my purposes. Thanks for the heads-up.
I'll update the patch to remove the pid field.
Thanks,
--breno
next prev parent reply other threads:[~2026-03-23 11:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 12:33 [PATCH] coredump: add tracepoint for coredump events Breno Leitao
2026-03-20 13:21 ` Christian Brauner
2026-03-20 18:48 ` Steven Rostedt
2026-03-23 11:41 ` Breno Leitao [this message]
2026-03-20 13:21 ` Christian Brauner
2026-03-20 14:18 ` Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acEmBRXmUqFc8fcz@gmail.com \
--to=leitao@debian.org \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox