[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56265FC7.9050409@redhat.com>
Date: Tue, 20 Oct 2015 17:37:43 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org, acme@...nel.org
Subject: Re: [PATCH] tools lib traceevent: update KVM plugin
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists