All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <pq@iki.fi>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Pekka J Enberg" <penberg@cs.helsinki.fi>,
	mingo@elte.hu, linux-kernel@vger.kernel.org,
	"Markus Metzger" <markus.t.metzger@gmail.com>
Subject: ftrace behaviour (was: [PATCH] ftrace: introduce tracing_reset_online_cpus() helper)
Date: Sat, 20 Dec 2008 00:44:53 +0200	[thread overview]
Message-ID: <20081220004453.50aec846@daedalus.pq.iki.fi> (raw)
In-Reply-To: <alpine.DEB.1.10.0812191216190.26432@gandalf.stny.rr.com>

Steven,

I have some critique on where the tracing infrastructure has been going
to lately. Please, let me know if I am just out-of-date on the current
state or misunderstood something.

On Fri, 19 Dec 2008 12:20:18 -0500 (EST)
Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> On Fri, 19 Dec 2008, Fr?d?ric Weisbecker wrote:
> > 
> > 
> > That's looks good.

The mmiotrace part looks good, too.

> > By the past, I also suggested Steven to automatically reset the traces
> > buffer each time a tracer is started, that
> > would factor out the code a bit more. I don't think one tracer would
> > avoid to reset the buffer once it is started, and
> > I don't think it is needed to reset twice on tracer switching: on stop
> > of the old tracer and on start on the new. Only
> > on start should be enough.
> 
> I'm actually against the idea of reseting a trace everytime we enable it.
> That is:
> 
> echo 1 > /debug/tracing/tracing_enabled
> 
> This should not reset the tracer. I actually do tracing where I disable 
> and enable it around areas I am interested in. I want all tracing, not 
> just the last one.

But doesn't this go against the fact, that you need to write 0 there to
be able to change the ring buffer size?

I mean, is tracing_enabled a "pause button" as I recall you explaining
a long time ago, and again now, or "kill it all" as required for changing
the ring buffer size?

Or has something changed that I don't know about?

Also another important but not so related question:
are the ring buffers allocated always on boot, whenever any tracer
(say, only mmiotrace) is enabled in the kernel configuration?

The ring buffers are huge and eat a considerable chunk of precious RAM.
How could distributors ever enable mmiotrace in their kernel
configurations by default, if it eats lots of memory for nothing?

If distributors do not enable mmiotrace by default, we are in a worse
situation than with out-of-tree mmiotrace module (if it could work).
Users need to reconfigure and recompile their kernels, which is
something we wanted to avoid. This is the reality right now.

Unless you have an answer to this, I'd like to suggest we resurrect the
"none" tracer. When "none" is the current tracer, there would be no
buffers allocated at all, and you could request a new buffer size.
"none" would be the default. Do you see any problems here?

AFAIK the "nop" tracer will not do, because it still allows text
messages (markers) to be written, and hence the ring buffer must
exist. Or am I wrong?

> Now we have recently added /debug/tracing/tracing_on which can quickly 
> stop tracing. I may be able to use that, and we can let the 
> tracing_enable" reset it too.

Does this mean I have to implement yet another on/off hook?

IMHO it is starting to be confusing having all these
current_tracer, tracing_enabled, tracing_on etc.

> I'll have to take a look at my scripts to see if that would work.
> 
> -- Steve


Thanks.

-- 
Pekka Paalanen
http://www.iki.fi/pq/

  parent reply	other threads:[~2008-12-19 22:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19 10:08 [PATCH] ftrace: introduce tracing_reset_online_cpus() helper Pekka J Enberg
2008-12-19 10:47 ` Frédéric Weisbecker
2008-12-19 17:20   ` Steven Rostedt
2008-12-19 22:05     ` Ingo Molnar
2008-12-19 22:44     ` Pekka Paalanen [this message]
2008-12-19 22:57       ` ftrace behaviour (was: [PATCH] ftrace: introduce tracing_reset_online_cpus() helper) Ingo Molnar
2008-12-19 23:27         ` Steven Rostedt
2008-12-19 23:34           ` Ingo Molnar
2008-12-20  0:29             ` Steven Rostedt
2008-12-20  1:38               ` Pekka Paalanen
2008-12-20  1:46                 ` Steven Rostedt
2008-12-20  2:32                   ` Pekka Paalanen
2008-12-20  2:56                     ` Steven Rostedt
2008-12-23 17:29                 ` Steven Rostedt
2008-12-20  0:03       ` Steven Rostedt
2008-12-20  2:17         ` Pekka Paalanen
2008-12-20  2:47           ` Steven Rostedt
2008-12-31 13:53             ` Pekka Paalanen
2008-12-31 18:33               ` Steven Rostedt
2008-12-31 18:57                 ` Pekka Paalanen
2008-12-31 19:06                   ` Steven Rostedt
2008-12-31 22:08                     ` Pekka Paalanen
2008-12-20 14:15         ` Frédéric Weisbecker
2008-12-20 13:15     ` [PATCH] ftrace: introduce tracing_reset_online_cpus() helper Frédéric Weisbecker
2008-12-19 15:30 ` 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=20081220004453.50aec846@daedalus.pq.iki.fi \
    --to=pq@iki.fi \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --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.