From: Christian E. <ehr...@li...> - 2008-04-14 13:00:45
|
Christian Ehrhardt wrote: > We all saw in prior kvm_stat counters that listed the different exit > reasons the high count of instruction emulation. The recent patch to > kvm-ppc-devel splits up those into the different instructions. I > attached a log of a simple guest boot&halt FYI. E.g. see the high number > of m[ft]msr instructions. [...] sorry for that type - I meants m[ft]spr activity. The full instruction tracing allows us to check e.g. which sprn's are accessed, in which sequences they are accessed, with which valued and from which pc of the guest kernel. I still don't fully trust these tracing or the kvm_stat extension because I get dfferent numbers of instructions (but the ratio between them look the same, so I think it's valid to look at the results). I expect that I increment by more than 1 in the kvm_stat instr patches atm - comments welcome (see the 1/3 in the patch series just posted to kvm-ppc-devel). I attached only a 2000 line partial log of the later part of the guest execution, because the full log is very big (3.9M). I can send a full log to everyone interested - please send me a mail (hmmm... maybe I upload that somewhere). 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 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 7494 wrteei 7051 mfspr 6073 mfmsr 4532 wrtee 1693 rfi 1647 tlbwe 943 mtmsr 89 lbz 84 stb 81 tlbsx 22 mfdcr 21 lbzx 20 mtdcr 7 stbx 3 sthbrx 3 iccci P.S. FYI - atm I think of adding such summary reports as optional part to the post processing script either packing most of the function into awk commands or by extending the python code. -- Grüsse / regards, Christian Ehrhardt IBM Linux Technology Center, Open Virtualization |