On Saturday, July 4, 2020, Alex Bennée <alex.ben...@linaro.org> wrote:
> > Aleksandar Markovic <aleksandar.qemu.de...@gmail.com> writes: > > > On Wednesday, July 1, 2020, Alex Bennée <alex.ben...@linaro.org> wrote: > > > >> > >> Ahmed Karaman <ahmedkhaledkara...@gmail.com> writes: > >> > >> > On Mon, Jun 29, 2020 at 6:03 PM Alex Bennée <alex.ben...@linaro.org> > >> wrote: > >> >> > >> >> Assuming your test case is constant execution (i.e. runs the same > each > >> >> time) you could run in through a plugins build to extract the number > of > >> >> guest instructions, e.g.: > >> >> > >> >> ./aarch64-linux-user/qemu-aarch64 -plugin tests/plugin/libinsn.so > -d > >> plugin ./tests/tcg/aarch64-linux-user/sha1 > >> >> SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6 > >> >> insns: 158603512 > >> >> > >> >> -- > >> >> Alex Bennée > >> > > >> > Hi Mr. Alex, > >> > I've created a plugins build as you've said using "--enable-plugins" > >> option. > >> > I've searched for "libinsn.so" plugin that you've mentioned in your > >> > command but it isn't in that path. > >> > >> make plugins > >> > >> and you should find them in tests/plugins/ > >> > >> > > Hi, both Alex and Ahmed, > > > > Ahmed showed me tonight the first results with number of guest > > instructions. It was almost eye-opening to me. The thing is, by now, I > had > > only vague picture that, on average, "many" host instructions are > generated > > per one guest instruction. Now, I could see exact ratio for each target, > > for a particular example. > > > > A question for Alex: > > > > - What would be the application of this new info? (Except that one has > nice > > feeling, like I do, of knowing the exact ratio host/guest instruction > for a > > particular scenario.) > > Well I think the total number of guest instructions is important because > some architectures are more efficient than others and this will an > impact on the total executed instructions. > > > I just have a feeling there is more significance of this new data that I > > currently see. Could it be that it can be used in analysis of > performance? > > Or measuring quality of emulation (TCG operation)? But how exactly? What > > conclusion could potentially be derived from knowing number of guest > > instructions? > > Knowing the ratio (especially as it changes between workloads) means you > can better pin point where the inefficiencies lie. You don't want to > spend your time chasing down an inefficiency that is down to the guest > compiler ;-) > > Thanks, Alex. I am still thinking, looking at broader picture, maybe that ratio, if applied on appropriate set of diverse workloads and averaged, could be the considered something like "efficiency of QEMU" - and that measure could possibly be used when making some TCG changes, aimed to achieve better performance. Interesting! A. > > > > Sorry for a "stupid" question. > > > > Aleksandar > > > > > > > > > >> > > >> > Are there any other options that I should configure my build with? > >> > Thanks in advance. > >> > > >> > Regards, > >> > Ahmed Karaman > >> > >> > >> -- > >> Alex Bennée > >> > > > -- > Alex Bennée >