From: Hollis Blanchard Date: Mon, 14 Apr 2008 20:26:06 +0000 Subject: Re: [kvm-ppc-devel] First detailed look at instruction emulation Message-Id: <200804141526.06452.hollisb@us.ibm.com> List-Id: References: <47FE281B.9090209@linux.vnet.ibm.com> In-Reply-To: <47FE281B.9090209@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Monday 14 April 2008 08:00:47 Christian Ehrhardt wrote: > > A short check of the ratio between the different sprn's used gave that > listing: grep sprn boot_halt_v4.instr.log | awk '{ printf("%s > %s\n",$11,$12) }' | sort | uniq -c| sort -rn 2461 0x01b SRR1 > 2256 0x110 SPRG0 > 2245 0x111 SPRG1 > 2004 0x01a SRR0 > 1538 0x113 SPRG3 > 1127 0x114 SPRG4 > 1034 0x3b2 MMUCR > 979 0x016 DEC > 597 0x030 PID > 509 0x115 SPRG5 > 499 0x117 SPRG7 > 475 0x150 TSR > 358 0x03d DEAR > 106 0x03e ESR > 3 0x11f PVR > 1 0x19f IVOR15 > 1 0x19e IVOR14 > 1 0x19d IVOR13 > 1 0x19c IVOR12 > 1 0x19b IVOR11 > 1 0x19a IVOR10 > 1 0x199 IVOR9 > 1 0x198 IVOR8 > 1 0x197 IVOR7 > 1 0x196 IVOR6 > 1 0x195 IVOR5 > 1 0x194 IVOR4 > 1 0x193 IVOR3 > 1 0x192 IVOR2 > 1 0x191 IVOR1 > 1 0x190 IVOR0 > 1 0x03f IVPR Good stuff. > While the instruction statistics for all instructions in that log is: > $awk '{ printf("%s\n",$8) }' boot_halt_v4.instr.log | sort | uniq -c | sort > -rn 9157 mtspr What I find interesting is that the top 7 SPR traps are for registers that have no immediate effect on execution, and that means they could easily be replaced with memory references (in both mtspr and mfspr cases). > 7494 wrteei > 7051 mfspr > 6073 mfmsr Another good candidate for rewriting as a memory reference. > 4532 wrtee Hmm, wrtee(i) would be more tricky to replace with memory references, at least without nop padding in the guest... > 1693 rfi > 1647 tlbwe > 943 mtmsr > 89 lbz > 84 stb > 81 tlbsx > 22 mfdcr > 21 lbzx > 20 mtdcr > 7 stbx > 3 sthbrx > 3 iccci -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel