kvmppc: add detailed instruction emulation
Subsystems (2)
PATCH 1/1 kvmppc: add detailed instruction emulation
From: Christian Ehrhardt <[email protected]>
This extends the kvm_stat reports for kvm on embedded powerpc. Since kvmppc is using emulation (no hardware support yet) this gives people interested in performance a detailed split of the emul_instruction counter already available. The kvmstat script I posted will follow in an updated version that can read the new values.
This statistic does not cover e.g. operants of the commands, but that way it should have only a small perf impact (never break what you want to measure). I intend to implement a full relayfs based instruction strem soon which will (I hope) support some filter mechanism to reduce the ammount of data moved. This more detailed statistic can be used e.g. after some special instructions are identified using the function of this patch. Both can coexist and are configurable in .config.
New kvmstat script and an example measurement follow in separate mails.
---
[diffstat]
arch/powerpc/kvm/Kconfig | 9 ++++ arch/powerpc/kvm/emulate.c | 57 +++++++++++++++++++++++++++ arch/powerpc/kvm/powerpc.c | 84 +++++++++++++++++++++++++++++++++++++++++ include/asm-powerpc/kvm_host.h | 40 +++++++++++++++++++ include/asm-powerpc/kvm_ppc.h | 50 ++++++++++++++++++++++++ 5 files changed, 240 insertions(+)
[diff]
arch/powerpc/kvm/Kconfig +9 -0
@@ -41,6 +41,15 @@ config KVM_POWERPC_440 ---help--- Provides support for KVM on 440 processors. +config KVM_POWERPC_440_INSTRUCTION_STAT + bool "ppc440 instruction emulation statistics" + depends on KVM && 44x && KVM_POWERPC_440 + select KVM_POWERPC + ---help--- + Adds the tracking of the different emulated instructions. This is + used to debug performance issues and adds a slight runtime overhead. + If unsure, say N. + config KVM_PPC_VIRTIO bool "Virtio Support" select VIRTIO
arch/powerpc/kvm/emulate.c +61 -0
282 lines not on this page · raw message
arch/powerpc/kvm/powerpc.c +84 -0
92 lines not on this page · raw message
include/asm-powerpc/kvm_host.h +40 -0
@@ -59,6 +59,46 @@ struct kvm_vcpu_stat {u32 emulated_inst_exits;u32 dec_exits;u32 ext_intr_exits; +#ifdef CONFIG_KVM_POWERPC_440_INSTRUCTION_STAT +u32 instr_trap; +u32 instr_rfi; +u32 instr_mfmsr; +u32 instr_lbzx; +u32 instr_wrtee; +u32 instr_mtmsr; +u32 instr_wrteei; +u32 instr_stbx; +u32 instr_stbux; +u32 instr_lhzx; +u32 instr_lhzux; +u32 instr_mfdcr; +u32 instr_mfspr; +u32 instr_sthx; +u32 instr_sthux; +u32 instr_mtdcr; +u32 instr_mtspr; +u32 instr_dcbi; +u32 instr_lwbrx; +u32 instr_tlbsync; +u32 instr_stwbrx; +u32 instr_tlbwe; +u32 instr_tlbsx; +u32 instr_lhbrx; +u32 instr_sthbrx; +u32 instr_iccci; +u32 instr_lwz; +u32 instr_lwzu; +u32 instr_lbz; +u32 instr_lbzu; +u32 instr_stw; +u32 instr_stwu; +u32 instr_stb; +u32 instr_stbu; +u32 instr_lhz; +u32 instr_lhzu; +u32 instr_sth; +u32 instr_sthu; +#endif /* CONFIG_KVM_POWERPC_440_INSTRUCTION_STAT */ };struct tlbe {
include/asm-powerpc/kvm_ppc.h +50 -0
56 lines not on this page · raw message
-------------------------------------------------------------------------
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel