All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] dynamic debug - adding ring buffer storage support
Date: Tue, 5 Jan 2010 10:14:13 -0500	[thread overview]
Message-ID: <20100105151413.GA2662@redhat.com> (raw)
In-Reply-To: <1262223857.28171.9.camel@gandalf.stny.rr.com>

On Wed, Dec 30, 2009 at 08:44:17PM -0500, Steven Rostedt wrote:
> 
> > That said, I sometimes dream about one event per printk.
> > 
> > Having, say:
> > 
> > /debug/tracing/events/printk/
> >          |
> >          ---- kernel/
> >          |      |
> >          |      ------- time/
> >          |      |        |
> >          |      |        ---- clocksource.c
> >          |      |                 |
> >          |      |                 --- clocksource_unstable:218/
> >          |      |                 |            |
> >          |      |                 |            ---- format
> >          |      |                 |            |
> >          |      |                 |            ---- filter
> >          |      |                 |            |
> >          |      |                 |            ---- enable
> >          |      |                 --- [...]
> >          |      ------- [...]
> >          |
> >          ---- drivers/
> >          |       |
> >          |       ---- [...]
> >          |
> >          ---- [...]
> > 
> > 
> > That would give a total control over every printk, trace_printk, etc...
> > 
> > Too bad that would bloat the memory.
> > Well, that could be wrapped in a single, wildly implemented (understand:
> > not using TRACE_EVENT macro) trace event, something able to walk through
> > every calls of printk, trace_printk, early_printk, etc... and imitate
> > a per printk event granularity.
> > 
> > But still it needs to be useful...
> 
> 
> I think we can do the above without bloating memory. Yes we would not
> need the TRACE_EVENT macro for this. The TRACE_EVENT macro is just for
> generic tracing, but we could easily come up with something specific for
> the printk's that will not bloat the kernel as much.
> 
> When I get some time, I may try to play with this idea.
> 
> -- Steve
> 

I agree with this direction...in terms of the implementation I was
thinking it could be very similar to the tracepoint optimization i've
been working on. Where we basically end up with just a 'nop' in place of
the printk and then when we enable it we patch the 'nop' with a jump to
the proper printk location...

-Jason

  reply	other threads:[~2010-01-05 15:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 11:32 [RFC PATCH] dynamic debug - adding ring buffer storage support Jiri Olsa
2009-12-22 12:06 ` Andi Kleen
2009-12-22 15:28   ` Jiri Olsa
2009-12-22 15:39 ` Jason Baron
2009-12-22 16:13   ` Jiri Olsa
2009-12-28  9:24     ` Ingo Molnar
2009-12-30 22:50       ` Frederic Weisbecker
2009-12-31  1:44         ` Steven Rostedt
2010-01-05 15:14           ` Jason Baron [this message]
2010-01-05  6:05         ` Ingo Molnar

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=20100105151413.GA2662@redhat.com \
    --to=jbaron@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.