LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	x86@kernel.org, Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Tony Luck <tony.luck@intel.com>, Joerg Roedel <joro@8bytes.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [RFC PATCH 2/2] tracing: Add tracepoint_printk cmdline
Date: Sat, 13 Dec 2014 08:18:32 -0500
Message-ID: <20141213081832.05cb4e6b@gandalf.local.home> (raw)
In-Reply-To: <20141213105925.GB29934@pd.tnic>

On Sat, 13 Dec 2014 11:59:25 +0100
Borislav Petkov <bp@alien8.de> wrote:

> On Sat, Dec 13, 2014 at 12:50:37AM -0500, Steven Rostedt wrote:
> > 
> > Add the kernel command line tracepoint_printk option that will
> > have tracepoints that are active sent to printk().
> > 
> > Passing "tracepoint_printk" will activate this. To turn it off
> > the sysctl /proc/sys/kernel/tracepoint_printk can have '0' echoed
> > into it. Note, this only works if the cmdline option is used.
> > Echoing 1 into the sysctl file without the cmdline option will
> > have no affect.
> > 
> > Note, this is a dangerous option. Having high frequency
> > tracepoints send their data to printk() can possibly cause
> > a live lock.
> > 
> > Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412121539300.16494@nanos
> > 
> > Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> > ---
> >  Documentation/kernel-parameters.txt | 18 ++++++++++++++++++
> >  include/linux/ftrace.h              |  1 +
> >  kernel/sysctl.c                     |  7 +++++++
> >  kernel/trace/trace.c                | 17 +++++++++++++++++
> >  kernel/trace/trace.h                |  1 +
> >  kernel/trace/trace_events.c         | 32 ++++++++++++++++++++++++++++++++
> >  6 files changed, 76 insertions(+)
> > 
> > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > index 1d09eb37c562..d81f464a7358 100644
> > --- a/Documentation/kernel-parameters.txt
> > +++ b/Documentation/kernel-parameters.txt
> > @@ -3500,6 +3500,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
> >  			See also Documentation/trace/ftrace.txt "trace options"
> >  			section.
> >  
> > +	tracepoint_printk[FTRACE]
> 
> Damn, this is long and most likely nasty to type on some dingy box when
> you're trying to debug stuff. Can we shorten it?
> 
> trace_printk

No this is already taken.

> tp_printk

Actually, I was thinking about shortening it to tp_printk.

> tp_print
> tp_pr
> ...
> 
> Last one is my favourite - we should call it ToiletPaper_Print :-)

What you need when your kernel is in the crapper.

-- Steve

> 
> > +			Have the tracepoints sent to printk as well as the
> > +			tracing ring buffer. This is useful for early boot up
> > +			where the system hangs or reboots and does not give the
> > +			option for reading the tracing buffer or performing a
> > +			ftrace_dump_on_oops.
> 


  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 20:35 Status of tip/x86/apic Thomas Gleixner
2014-12-12 21:45 ` Borislav Petkov
2014-12-12 23:02 ` Linus Torvalds
2014-12-12 23:14 ` Steven Rostedt
2014-12-13  5:48   ` [RFC PATCH 0/2] tracing: The Grinch who stole the stealing of Christmas Steven Rostedt
2014-12-13  5:49     ` [RFC PATCH 1/2] tracing: Move enabling tracepoints to just after mm_init() Steven Rostedt
2014-12-13  5:50     ` [RFC PATCH 2/2] tracing: Add tracepoint_printk cmdline Steven Rostedt
2014-12-13 10:59       ` Borislav Petkov
2014-12-13 13:18         ` Steven Rostedt [this message]
2014-12-13 13:33           ` Borislav Petkov
2014-12-14 10:57 ` Status of tip/x86/apic Jiang Liu
2014-12-15 15:52 ` Steven Rostedt
2015-01-02 17:29   ` Mathieu Desnoyers

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=20141213081832.05cb4e6b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=jiang.liu@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git