From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbbJTP0y (ORCPT ); Tue, 20 Oct 2015 11:26:54 -0400 Received: from smtprelay0213.hostedemail.com ([216.40.44.213]:54454 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752174AbbJTP0v (ORCPT ); Tue, 20 Oct 2015 11:26:51 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2895:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4362:5007:6117:6119:6120:6261:6691:7809:7875:7901:7903:10004:10400:10848:10967:11026:11232:11658:11914:12050:12438:12517:12519:12555:12663:12740:13069:13138:13231:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: hate77_75c34f8feeb39 X-Filterd-Recvd-Size: 2945 Date: Tue, 20 Oct 2015 11:26:48 -0400 From: Steven Rostedt To: Paolo Bonzini Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, acme@kernel.org Subject: Re: [PATCH] tools lib traceevent: update KVM plugin Message-ID: <20151020112648.4d323069@gandalf.local.home> In-Reply-To: <56265B70.1000206@redhat.com> References: <1443695293-31127-1-git-send-email-pbonzini@redhat.com> <56181F25.2070402@redhat.com> <20151020143244.GG4400@redhat.com> <20151020104459.7e7f7e77@gandalf.local.home> <56265B70.1000206@redhat.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Oct 2015 17:19:12 +0200 Paolo Bonzini wrote: > > > On 20/10/2015 16:44, 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. > > Going forward it's really unlikely that the role will change apart from > adding new bits. These can be added to the plugin while keeping it > backwards-compatible. Addition to the role happen when you implement > new virtual MMU features such as SMEP, SMAP or SMM. That's once per year > or less. > > > Is the plugin even still needed? I'm looking at some of the kvm events > > and they seem to be mostly self sufficient. What ones need a plugin > > today? > > Yes, most of them are. It's only needed for kvm_mmu_get_page, > kvm_mmu_prepare_zap_page and kvm_emulate_insn. The latter is only > interesting if you install the disassembler library, and I wouldn't > really care if it went away. > > kvm_mmu_get_page and kvm_mmu_prepare_zap_page, however, have output like > > kvm_mmu_get_page: [FAILED TO PARSE] mmu_valid_gen=0x2 gfn=786432 role=1923 root_count=0 unsync=0 created=1 > > without the plugin vs. > > kvm_mmu_get_page: new sp gfn c0000 3 q0 direct rwx !pae !nxe !wp root 0 sync > > with the plugin. Thanks for the update. -- Steve