Re: [PATCH v3] tracing: Ignore mmiotrace from kernel commandline
From: Steven Rostedt
Date: Tue Sep 19 2017 - 12:25:20 EST
On Tue, 12 Sep 2017 20:18:35 +0800
"Ziqian SUN (Zamir)" <zsun@xxxxxxxxxx> wrote:
> >> I feel the core trace printed by WARN is not so meaningful, so I use
> >> pr_warn instead.
> > I'm fine with pr_warn, but I'm curious to what you mean by "not so
> > meaningful"? A WARN() will cause a dump stack, which usually shows up
> > as a bug in systems and more likely to be seen. But if someone is
> > adding this to the kernel command line and it's not working, they
> > should be looking for the tracer name within the dmesg anyway.
> Following is the log I tried with WARN before. With WARN we have both
> the warning message, and the stack trace. The stack trace goes into
> stacing_set_tracer, but not showing mmiotrace. I mean, this is useful
> for debugging, but maybe confusing for users who is willing to report
> bugs but not a kernel geek. With pr_warn we already indicate mmiotrace
> is ignored, and is neat.
I'm now leaning towards WARN() over pr_warn(). Sure it's more useful
for a kernel geek and not an everyday user, but I will counter that an
everyday user should most definitely not be enabling mmiotrace! Or
other traces for that matter.
But then again, it's not really a bug (it's a feature), so I guess I'll
just take this patch as is.