From: Hollis Blanchard Date: Tue, 15 Apr 2008 14:20:50 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] [2/3] kvmppc: full instruction Message-Id: <200804150920.50939.hollisb@us.ibm.com> List-Id: References: <200804141545.27659.hollisb@us.ibm.com> In-Reply-To: <200804141545.27659.hollisb@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: kvm-ppc@vger.kernel.org On Tuesday 15 April 2008 01:20:48 Christian Ehrhardt wrote: > > I'm not sure how I feel about logging *every* faulting instruction, > > rather than aggregating statistics about them. Actually, I know how I > > feel, and it's uncomfortable. :) > > > > It's a userspace process that must be extracting this data from the rel= ay > > buffers, and that only happens when it's scheduled. How many instruction > > exits could we get in a few timeslices? I think we could easily overflow > > the relay buffers, especially if the host is under load. > > The patch series intentionally has two instruction statistics. > One for low overhead giving you just some counters, and additionally we c= an > extend these counters as we want e.g. with sprn numbers. The other is to > enable knowingly a high overhead profiling, but it gives you a full trace > which can be used e.g. to completely see "what exactly is the guest doing > there" by looking at which instructions are emulated in which order. So > both have there right to exist, because there are use scenarios for both = of > them. By making them configurable it is developers choice what to use. I guess it can be useful to see what's happening when a guest is=20 getting "stuck". However, there are other interesting events to account for in this case as = well, such as the TLB tracing I posted earlier. I think it makes sense to=20 include all of those events in the same relay channel, rather than having o= ne=20 channel for instructions, one for TLB, etc. > >> +struct instr_record { > >> + =A0 =A0 =A0 u32 time; > >> + =A0 =A0 =A0 u32 pc; > >> + =A0 =A0 =A0 u32 instr; > >> + =A0 =A0 =A0 u32 rsval; > >> + =A0 =A0 =A0 u32 raval; > >> + =A0 =A0 =A0 u32 rbval; > >> +}; > > > > In addition to the instruction itself, I can see how the PC would be > > useful, and maybe also the time when we have multiple cores. (Well, or > > maybe it would be better to have one channel per core anyways.) But I > > think RS/RA/RB are way overkill here. What would a userspace tool do wi= th > > this data anyways? > > The decoding scripts shows you what values are used e.g. for a mtmsr you > see what value was moved to the register. But I agree that the value of > r*val is much smaller than time,pc,instr. Removing these three should spe= ed > it up to allow us tracing all instructions. I will change the patch and > resend it. Does that really speed it up? I wouldn't expect a measurable difference. --=20 Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference=20 Don't miss this year's exciting event. There's still time to save $100.=20 Use priority code J8TL2D2.=20 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java= one _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel