From: Steven Rostedt <rostedt@goodmis.org>
To: Tim Bird <tim.bird@am.sony.com>
Cc: "Bird, Tim" <Timothy.Bird@am.sony.com>,
Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Li Zefan <lizf@cn.fujitsu.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux kernel <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 2/4] ftrace - add function_duration tracer
Date: Thu, 10 Dec 2009 18:47:49 -0500 [thread overview]
Message-ID: <1260488869.2146.307.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4B217803.6080407@am.sony.com>
On Thu, 2009-12-10 at 14:36 -0800, Tim Bird wrote:
> The ring buffer code was particularly slow. I was using
> a simple fixed-size array in KFT (on a uniprocessor), and
> the time to save an event was under 1 microsecond. With
> ftrace on the same hardware, it costs about 6 microseconds
> to save an event.
>
Well, I know you work in embedded so it may be much slower.
I just ran the ring_buffer_benchmark on a Xeon Quad 2660MHz with
2.6.32-rc7 and I got 190ns per trace entry. (Note most of this time is
spent in the timestamp calculation!)
I booted the latest 2.6.32 kernel, where I've made some changes to the
time keeping code and got 117ns per entry. I sent out a RFC patch set,
and disabled all the RB_WARN_ON safety checks and got it down to 90ns
per trace entry! This still includes the 3 levels of checking if the
buffer is enabled. Those checks are just a nit and probably (haven't
tested) cost a single ns. The variables being checked are labeled
read_mostly and are most likely in the cache.
Maybe you want to test out the overhead again?
Note, the ftrace infrastructure's first priority is stability so I won't
be removing those RB_WARN_ONs. Next priority is to have non tracing be
unaffected. Third is tracing being as fast as possible. A tracer that
does not need to worry about going away when disabled will probably
have a performance advantage when tracing. But, if it causes a
noticeable overhead when disabled (like -finstrument-function does, and
it has a lot more lines than mcount), it will never be merged.
-- Steve
prev parent reply other threads:[~2009-12-10 23:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 22:40 Tim Bird
2009-12-10 7:08 ` Ingo Molnar
2009-12-10 12:03 ` Frederic Weisbecker
2009-12-10 14:11 ` Ingo Molnar
2009-12-10 14:53 ` Steven Rostedt
2009-12-10 15:38 ` Ingo Molnar
2009-12-10 16:22 ` Steven Rostedt
2009-12-10 16:52 ` Ingo Molnar
2009-12-10 17:16 ` Steven Rostedt
2009-12-10 17:28 ` Frank Ch. Eigler
2009-12-10 17:57 ` Ingo Molnar
2009-12-10 18:04 ` Frank Ch. Eigler
2009-12-10 18:35 ` Ingo Molnar
2009-12-10 18:50 ` Frank Ch. Eigler
2009-12-10 20:14 ` Ingo Molnar
2009-12-10 21:30 ` Frank Ch. Eigler
2009-12-10 14:29 ` Steven Rostedt
2009-12-10 16:16 ` Ingo Molnar
2009-12-10 20:23 ` Frederic Weisbecker
2009-12-10 21:55 ` Steven Rostedt
2009-12-10 22:40 ` Frederic Weisbecker
2009-12-10 21:13 ` Tim Bird
2009-12-10 22:04 ` Steven Rostedt
2009-12-10 22:26 ` Tim Bird
2009-12-10 22:36 ` Tim Bird
2009-12-10 23:47 ` Steven Rostedt [this message]
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=1260488869.2146.307.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=Timothy.Bird@am.sony.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--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®