From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Arjan van de Ven <arjan@linux.intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Fix powerTOP regression with 2.6.39-rc5
Date: Sat, 07 May 2011 06:45:10 -0400 [thread overview]
Message-ID: <1304765110.25414.2564.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110507065803.GA23414@elte.hu>
On Sat, 2011-05-07 at 08:58 +0200, Ingo Molnar wrote:
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
> You have just summed up the main philosophical difference between perf and
> ftrace: with perf we have a "sane tooling first" approach, while ftrace is
> still the old "kernel developers first" approach.
I actually believe that the opposite is true.
>
> In the past 10 years i pushed tons of instrumentation code upstream and for a
> long time the kernel-integrated ftrace approach looked like the technical best
> solution to me, but after 2 years of sane instrumentation tooling via a proper
> user-space ABI and tools/perf/ i'm not looking back.
>
I would like to point out that the problem with the ABI breakage came
through perf and not ftrace. From what I gathered from Linus's response,
is that, although I made a robust interface (the format of the events)
for tools to use, but it was possible for the tools to use another
interface to directly interact with the raw binary data. Since it was
easier to just map the raw binary data instead of using the exported
format, they did that instead, even though a library already existed to
parse the format and keep the events robust. And the "reality" is that
the raw binary format became the ABI.
With ftrace, there was no easy way to get at that raw format. It was
perf that exposed the raw binary formats that tools like powerTop used.
The "easy" way was just to use the raw binary format as perf made it
easy to access. Thus, instead of spending the time to use the proper
robust format, tools just mapped the raw binary format instead. Peter
Zijlstra, wisely saw this problem and asked me to randomize the fields
to prevent the raw mappings. But that would have broken the ease of use
of TRACE_EVENTS() for kernel developers, or would have drastically
slowed down the trace recording. We both reluctantly kept the fields the
same. Once again, I feel burned because I didn't listen to Peter ;)
Now the end of Linus's email, he gave a slight "but". It seems as though
not many tools are currently accessing the raw data, if all those tools
agree to convert to the proper format before too many others start, then
he may allow this change to take place. I already discussed this with
Arjan, and he agreed to use the libparsevent.so if I can get it packaged
with Fedora and Ubuntu. This is a robust solution, so that we do not get
stuck with things like recording for every single event, the pid,
preempt count, interrupt flags and other things in the kernel forever.
> I am strongly convinced that we need to bite the bullet and unify the two
> approaches to enable even better tooling: expose the remaining bits of tracing
> functionality not available via perf yet via the perf ABI and move it under a
> single umbrella, slowly phase out the ABI-unstable /debug/tracing/ debugfs crap
> for new features and use the strict perf ABI approach. Steve?
Actually, I now want to separate ftrace from perf even more. This
problem is not a ftrace problem but a perf one. The raw abi that tools
uses is from perf. Thus, that "padding" can be added to perf directly
instead of using the ftrace code, and powertop will still work, and
ftrace can change on the fly as all its tools use the libparsevent
libary.
Here's the choices then:
1) we get libparsevent.so out into the world and all tools can use it,
and the raw formats of the trace events will no longer be an issue as
long as the names of events and fields stay the same.
2) we separate perf from ftrace and keep the "stable" ABI for perf, and
let ftrace advance into a more efficient tracer.
-- Steve
next prev parent reply other threads:[~2011-05-07 10:45 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 20:08 Arjan van de Ven
2011-05-06 20:20 ` Steven Rostedt
2011-05-06 20:51 ` Linus Torvalds
2011-05-06 21:10 ` Steven Rostedt
2011-05-06 21:24 ` Linus Torvalds
2011-05-06 21:14 ` Steven Rostedt
2011-05-06 21:28 ` Linus Torvalds
2011-05-06 21:29 ` Arjan van de Ven
2011-05-06 21:57 ` Steven Rostedt
2011-05-07 6:58 ` Ingo Molnar
2011-05-07 10:45 ` Steven Rostedt [this message]
2011-05-07 14:44 ` Ingo Molnar
2011-05-07 17:20 ` Steven Rostedt
2011-05-07 17:59 ` Arjan van de Ven
2011-05-08 21:08 ` Frederic Weisbecker
2011-05-08 21:56 ` Arjan van de Ven
2011-05-07 19:00 ` Ingo Molnar
2011-05-10 3:07 ` Steven Rostedt
2011-05-10 4:44 ` Dave Chinner
2011-05-10 5:39 ` Steven Rostedt
2011-05-10 7:36 ` Dave Chinner
2011-05-10 7:54 ` Ingo Molnar
2011-05-10 8:09 ` Ingo Molnar
2011-05-10 8:32 ` Arjan van de Ven
2011-05-10 8:44 ` Ingo Molnar
2011-05-10 9:14 ` Pekka Enberg
2011-05-10 8:41 ` Ingo Molnar
2011-05-10 13:06 ` Steven Rostedt
2011-05-11 21:51 ` Ingo Molnar
2011-05-11 22:36 ` Steven Rostedt
2011-05-17 7:15 ` Michael Rubin
2011-05-17 11:19 ` Steven Rostedt
2011-05-17 13:24 ` David Ahern
2011-05-17 13:27 ` Steven Rostedt
2011-05-17 13:30 ` Ingo Molnar
2011-05-10 8:47 ` Ingo Molnar
2011-05-10 10:33 ` Steven Rostedt
2011-05-10 19:13 ` David Sharp
2011-05-09 23:37 ` David Sharp
2011-05-10 7:39 ` 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=1304765110.25414.2564.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=a.p.zijlstra@chello.nl \
--cc=arjan@linux.intel.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 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®