The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Agatha Isabelle Moreira <code@agatha.dev>,
	Yury Norov <ynorov@nvidia.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Ao Sun <ao.sun@transsion.com>, David Carlier <devnexen@gmail.com>,
	Karl Mehltretter <kmehltretter@gmail.com>,
	Martin Kaiser <martin@kaiser.cx>,
	Pengpeng Hou <pengpeng@iscas.ac.cn>,
	Qian-Yu Lin <tiffany019230@gmail.com>,
	Rik van Riel <riel@surriel.com>, Rosen Penev <rosenp@gmail.com>,
	Shuvam Pandey <shuvampandey1@gmail.com>,
	Vineeth Pillai <vineeth@bitbyteword.org>,
	Yash Suthar <yashsuthar983@gmail.com>,
	Yu Peng <pengyu@kylinos.cn>
Subject: Re: [GIT PULL] tracing: Updates for 7.2
Date: Sun, 21 Jun 2026 17:19:10 -0400	[thread overview]
Message-ID: <20260621171910.3d1f6504@fedora> (raw)
In-Reply-To: <CAHk-=wj6ss4mSVhs8ppOa3cy8TVoEOJX9auGL3008jsn8dATyw@mail.gmail.com>

On Sun, 21 Jun 2026 13:51:30 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> First you say that it's for a debugging patch that adds the
> trace_printk() locally and never makes it into the tree, which
> explains why nobody else wants to see that thing.

Who is that nobody? I know you don't use trace_printk() at all, but I
would love to have a survey of *all* kernel developers to find out the
percentage that find it useful.

You seem to be of the mind set "I don't think it's useful, so nobody
should think it's useful". Just like you did with Link tags that point
to patches.

> 
> And now you say the problem is that you have to remember to not commit
> the header you added.

It's not the main problem, it's just one of many things that can
happen. But yeah, it's not a big deal.

> 
> JUST LIKE THAT WHOLE trace_printk() that was apparently all just local
> and never committed either.

There's been cases of trace_printk() ending up accidentally in
production. The reason to not allow it in production is because it
writes to the main tracing buffer and it's always on. If it was
allowed, every subsystem would use it and then when you want to debug
something you have to fight the noise of everyone else's trace_printk()
when you want to see yours. It would also make trace events useless.

Thus, a common workflow (and this is what others have told me they do,
I personally don't do this) is to use trace_printk() to find out what
is useful to track for debugging. Then, if important data was traced,
they would turn it into a trace_event. Trace events are basically
trace_printk()s but in a proper form.

On my Fedora laptop:

 $ sudo cat /sys/kernel/tracing/available_events | wc -l
2719

Thus trace_events are very commonly used, which are just
trace_printk()s that you can individually enable and disable.

> 
> So in your magical world, adding the trace_printk() isn't a problem.
> Spending effort debugging things that are hard to reproduce isn't a
> problem. And remembering to not commit said debug code is apparently
> also a non-issue.
> 
> But that extra #include is suddenly a huge problem both to add in the
> first place - oh woe, how it hurts to add that one line to make it
> possible to do those week-long debug sessions - and then to not
> commit.

It is just frustrating when you are focusing on debugging something,
and you go to compile and it errors with "prototype not found". It's
just one more thing added to frustration of fixing code that doesn't
work. I thought we want to make developers lives easier. But since
*you* don't use it, you think it's not an issue.

> 
> This thread has gone from just plain dumb to ridiculous, and I have to
> mute this conversation in order to not get dumber by association.

I 100% agree with getting rid of things in kernel.h. But the little
Makefile change and the config can keep people using trace_printk()
like they have been doing since 2009. Would you at least be OK with
that? It shouldn't make any difference to your workflow, but would make
things easier for others, even if you don't think it would. At least
humor us ;-)

-- Steve

  reply	other threads:[~2026-06-21 21:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 22:01 [GIT PULL] tracing: Updates for 7.2 Steven Rostedt
2026-06-19  4:23 ` Linus Torvalds
2026-06-19 12:15   ` Steven Rostedt
2026-06-19 14:35     ` Linus Torvalds
2026-06-19 15:40       ` Sebastian Andrzej Siewior
2026-06-19 15:43         ` Linus Torvalds
2026-06-19 18:30           ` Sebastian Andrzej Siewior
2026-06-19 19:07             ` Linus Torvalds
2026-06-19 20:28               ` Thomas Gleixner
2026-06-19 20:55                 ` Linus Torvalds
2026-06-20  9:22                   ` Willy Tarreau
2026-06-19 22:28               ` Linus Torvalds
2026-06-19 15:54       ` Steven Rostedt
2026-06-19 16:29         ` Linus Torvalds
2026-06-21 20:26         ` Agatha Isabelle Moreira
2026-06-21 20:51           ` Linus Torvalds
2026-06-21 21:19             ` Steven Rostedt [this message]
2026-06-20 20:24       ` Julia Lawall
2026-06-21 20:34         ` Agatha Isabelle Moreira
2026-06-20 22:19       ` Steven Rostedt
2026-06-20 22:39         ` Linus Torvalds
2026-06-20 23:43           ` Steven Rostedt
2026-06-21  0:18             ` Linus Torvalds
2026-06-21  6:34               ` Steven Rostedt
2026-06-21  7:10               ` Steven Rostedt
2026-06-19 15:19   ` Yury Norov
2026-06-19 15:40     ` Linus Torvalds
2026-06-19 22:18       ` Yury Norov
2026-06-19  4:38 ` pr-tracker-bot

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=20260621171910.3d1f6504@fedora \
    --to=rostedt@goodmis.org \
    --cc=ao.sun@transsion.com \
    --cc=code@agatha.dev \
    --cc=devnexen@gmail.com \
    --cc=kmehltretter@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@kaiser.cx \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=pengyu@kylinos.cn \
    --cc=riel@surriel.com \
    --cc=rosenp@gmail.com \
    --cc=shuvampandey1@gmail.com \
    --cc=tiffany019230@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vineeth@bitbyteword.org \
    --cc=yashsuthar983@gmail.com \
    --cc=ynorov@nvidia.com \
    /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