From: Steven Rostedt <rostedt@goodmis.org>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Steven Rostedt <srostedt@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: add tracing_thresh support to function_graph tracer (v3)
Date: Fri, 26 Feb 2010 15:37:20 -0500 [thread overview]
Message-ID: <1267216640.6328.135.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4B88187B.4020909@am.sony.com>
On Fri, 2010-02-26 at 10:52 -0800, Tim Bird wrote:
> > Now, your patch will have an impact if you do not enable DYNAMIC_FTRACE,
> > because then all callers to mcount can be traced. But then you have a
> > 13% overhead in the system.
>
> Yes. I have primarily been using this for bootup time tracing,
> on ARM (without DYNAMIC_FTRACE), and only during development.
> I wouldn't leave it on in a production system.
>
> I'm fine with yanking that out of this patch, since I have other
> stuff I still have to patch to use it on ARM.
Still this change is off topic for this patch. Anyway, what you could
add is:
+#ifdef CONFIG_DYNAMIC_FTRACE
+# define init_notrace
+#else
+# define init_notrace notrace
+#endif
-#define __init __section(.init.text) __cold notrace
+#define __init __section(.init.text) __cold init_notrace
Would also need a comment that dynamic ftrace, for safety reasons does
not trace __init sections with or without notrace. Just make it always
notrace. But static ftrace can safely trace init sections, so keep them
on when dynamic ftrace is disabled.
> >> - ret = trace_seq_printf(s, "}\n");
> >> + if (tracing_thresh) {
> >> + ret = trace_seq_printf(s, "} (%ps)\n", (void *)trace->func);
> >
> > Ah, this isn't what I wanted. I wanted something a bit more complex ;-)
>
> :-)
>
> This is simpler than the EXIT_FUNC option I had earlier, but still
> not automatic as you describe below.
> >
> > I was thinking of keeping a small stack per cpu that keeps track of
> > previous entries. If a exit is called that does not have a matching
> > entry (can easily check the depth parameter) then we should print out
> > the function name. This way, even without the tracing_thresh tracer, we
> > can see what dangling '}'s are. This happens now with the current
> > tracer.
>
> This would be a nice addition. I was a little worried about
> the checking tracing_thresh at output time (as opposed to trace time).
> A user could theoretically change the tracing_thresh after capture
> but before output, and get only the closing braces.
>
> In my humble opinion, even when you've seen the opening braces,
> it can be useful to show the function name on the exit line.
> For example, right now you can't use grep on a big trace
> (just a regular function graph trace, not the one using
> tracing_thresh) to find the pattern of function durations
> for specific functions.
Then we should add an option to always show it as well. I've added
showing it before, and it does become a distraction in scanning it with
the human eye. But a grep is a reason to have the option.
>
> > I can add this tomorrow. Then I can take this patch and cut out the
> > stuff not needed.
> Thanks.
Currently working on it.
-- Steve
next prev parent reply other threads:[~2010-02-26 20:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 23:36 Tim Bird
2010-02-26 2:46 ` Frederic Weisbecker
2010-02-26 18:27 ` Tim Bird
2010-02-27 10:25 ` Frederic Weisbecker
2010-02-26 4:37 ` Steven Rostedt
2010-02-26 18:52 ` Tim Bird
2010-02-26 20:37 ` Steven Rostedt [this message]
2010-03-11 14:37 ` [tip:tracing/urgent] function-graph: Add tracing_thresh support to function_graph tracer tip-bot for Tim Bird
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=1267216640.6328.135.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srostedt@redhat.com \
--cc=tim.bird@am.sony.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
all inboxes | Powered by JetHome®