From: Paolo Bonzini <pbonzini@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
acme@kernel.org
Subject: Re: [PATCH] tools lib traceevent: update KVM plugin
Date: Tue, 20 Oct 2015 17:37:43 +0200 [thread overview]
Message-ID: <56265FC7.9050409@redhat.com> (raw)
In-Reply-To: <20151020112648.4d323069@gandalf.local.home>
On 20/10/2015 17:26, Steven Rostedt wrote:
> > > > What happens if you run new perf on an older kernel. Is this new plugin
> > > > going to be screwed up? Plugins should be backward compatible.
> >
> > If you run new perf on older kernel, the new plugin will print the
> > "role" field (see kvm_mmu_print_role) slightly incorrectly. That said,
> > the existing plugin was _also_ printing the role in a wildly wrong
> > format, like 2.6.35 vintage; the glevels field was removed by commit
> > 5b7e0102ae74, "KVM: MMU: Replace role.glevels with role.cr4_pae", in
> > April 2010.
>
> Can we add a check if glevels field exists, and do the old format if it
> does? I'm very strict on making sure event-parse works with all
> incarnations of kernels.
Note that this is not a glevels _tracepoint_ field. The tracepoint
field is "role" and it is a 64-bit integer. The plugin interprets the
bitfields of that integer, and the position/meaning of the bitfields has
changed.
I guess I could use the mmu_valid_gen field as a proxy (it was
introduced after glevels was removed), and only provide the "very old"
(up to 2.6.34) and "new" (4.2+) formats. The "old" format (2.6.35-4.1)
was never implemented in the plugin; it may well remain that way.
However, it frankly seems a bit academic. The parsing _will_ work,
apart from printing a nonsensical role just like it has always done for
the past four years.
Paolo
next prev parent reply other threads:[~2015-10-20 15:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 10:28 [PATCH] tools lib traceevent: update KVM plugin Paolo Bonzini
2015-10-09 20:10 ` Paolo Bonzini
2015-10-20 14:32 ` Arnaldo Carvalho de Melo
2015-10-20 14:44 ` Steven Rostedt
2015-10-20 15:19 ` Paolo Bonzini
2015-10-20 15:26 ` Steven Rostedt
2015-10-20 15:37 ` Paolo Bonzini [this message]
2015-10-20 15:48 ` Steven Rostedt
2015-10-20 15:49 ` Paolo Bonzini
2015-10-20 15:50 ` Arnaldo Carvalho de Melo
2015-10-20 16:21 ` Steven Rostedt
2015-10-22 9:22 ` [tip:perf/core] " tip-bot for Paolo Bonzini
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=56265FC7.9050409@redhat.com \
--to=pbonzini@redhat.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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.