qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Basic block statistics
@ 2003-11-11 13:14 Johan Rydberg
  2003-11-11 13:44 ` Johan Rydberg
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Rydberg @ 2003-11-11 13:14 UTC (permalink / raw)
  To: qemu-devel

Hi,

I hacked QEMU to dump some statistics regarding the length of
the basic blocks with respect of their length.  I booted the
Debian image suppblied by Leigh Dyer til the login prompt.

It seems that the avg basic block length is ~ 5 insns.  This seems 
as a reasonable number for C code.  

What is a bit supprising to me  is that only ~ 0.3 % of these blocks 
has internal loops (the CTI insn at the end has the first insn in the 
BB as target).  If you treat basic blocks that has just includes 
a single insn with a rep/repz prefix, the amount of basic blocks that
contain loops increases to ~ 2.38 %.  

I have yet not figured out a way to alter QEMU to see how much of
the execution time these blocks consume.  Say that the ~2.38% of
the blocks consume 10% of the time, it might be worth doing extra
optmizations on then.  Fabrice, do you know how I could hack QEMU
to get this kind of information?

-- 
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-11-11 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 13:14 [Qemu-devel] Basic block statistics Johan Rydberg
2003-11-11 13:44 ` Johan Rydberg
2003-11-11 14:18   ` Fabrice Bellard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).