From: Frederic Weisbecker <fweisbec@gmail.com>
To: Thomas Renninger <trenn@suse.de>
Cc: tardyp@gmail.com, jean.pihet@newoldbits.com,
acme@ghostprotocols.net, linux-perf-users@vger.kernel.org,
mathieu.desnoyers@efficios.com,
linux-trace-users@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Perf ABI versioning
Date: Mon, 24 Jan 2011 21:34:51 +0100 [thread overview]
Message-ID: <20110124203449.GC2318@nowhere> (raw)
In-Reply-To: <201101241704.01021.trenn@suse.de>
(Adding LKML and more tracing people in Cc)
On Mon, Jan 24, 2011 at 05:04:00PM +0100, Thomas Renninger wrote:
> Hi,
>
> as I recently cleaned up the power events with
> some format/abi adjustings...
>
> I realized that it was rather easy to adjust
> the stuff in drivers/tools/perf, because there
> are some nice facilities to query which events
> are available.
>
> I looked at pytimechart, there it's not that nice
> and convenient would be some kind of version number.
>
> pytimechart can parse traces which are simply copied
> away from /sys/kernel/debug/trace and to check for
> available events and their format, one would have to
> do a separate, ugly to implement, iteration of parsing.
>
> Would it make sense to introduce a trace
> ABI version number?
> It would be enough to increase it by one every time
> any event (don't know about other perf facilities) is
> added, removed or modified.
> Ideally the modifications are tracked with a short
> description in a file like Documentation/trace/format.changes
>
> Untested, but the patch at the end should simply add
> a version number on top of
> /sys/kernel/debug/trace file
>
> While this should be enough for the kernel, perf record
> would need to include it into it's binary perf.data format
> as well?
>
> Then userspace apps could easily test whether supported
> events would be included at all, whether only a subset of
> supported events were made available and which format they have.
>
> Does this make sense?
This may be generally useful to help dealing with tracepoint ABI
changes.
But instead of a global tracing ABI number, I would rather suggest
one number per tracepoint subsystem (sched, power, etc...).
Ideally it would be per event, but sometimes those events tend to be
renamed or a whole tracepoint subsystem refactored (see workqueue
lately). Hence it might be better per subsystem.
Now these numbers can be increased in the case of new fields added,
fields removed, fields renamed, new tracepoints, removed tracepoints,
renamed tracepoints.
But I think we shouldn't do that for pure ascii format changes, because
we created the format to avoid fixing that on the rock. I know that
would help Pytimechart, and it's a precious tool that I wish we can help
the development. But we shouldn't encourage the pattern match way of
parsing events, instead of using the format file.
Also, tracking the changes in the Documentation is going to be a
nightmare. I suggest developers who want to dig into details of
an ABI change to check the code or the format themselves.
And BTW we can probably provide more granularity in the versioning
with a major number for ABI changes that may break tools (field or
tracepoint removal, rename, etc...) and a minor number for changes
that probably won't break tools but could bring them more informations:
new tracepoint fields, new tracepoints, etc... so we can tell the tools
about that.
Hm?
next prev parent reply other threads:[~2011-01-24 20:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 16:04 Perf ABI versioning Thomas Renninger
2011-01-24 16:18 ` Thomas Renninger
2011-01-24 17:26 ` Pierre Tardy
2011-01-24 17:28 ` Jean Pihet
2011-01-24 20:05 ` Frederic Weisbecker
2011-01-24 20:12 ` Mathieu Desnoyers
2011-01-24 21:02 ` Thomas Renninger
2011-01-24 20:34 ` Frederic Weisbecker [this message]
2011-01-24 20:39 ` Peter Zijlstra
2011-01-24 20:40 ` Frederic Weisbecker
2011-01-24 21:28 ` Ingo Molnar
2011-01-24 21:49 ` Thomas Renninger
2011-01-24 21:57 ` Arnaldo Carvalho de Melo
2011-01-24 22:30 ` Thomas Renninger
2011-01-24 22:46 ` Frederic Weisbecker
2011-01-24 23:05 ` Arnaldo Carvalho de Melo
2011-01-24 21:59 ` Frederic Weisbecker
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=20110124203449.GC2318@nowhere \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=jean.pihet@newoldbits.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-users@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tardyp@gmail.com \
--cc=tglx@linutronix.de \
--cc=trenn@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).