Based on Hollis tlb tracing from http://penguinppc.org/~hollisb/kvm/ this mail contains a c file that can be used to read the instruction traces into a file (binary) and a python script that processes these binary files to a readable table. @Hollis we might think of merging these and possible following tools of that kind and/or strive to add is to kvm-userspace - what do you think ? To use the instruction relay stuff, on the host: # First build a kernel with "ppc440 instruction emulation tracing" enabled as host kernel # then run the guest workload while reading the relay file % gcc -Wall -O2 44x_instr.c -o 44x_instr % ./44x_instr > instrlog.bin & # can also be invoked later e.g only around some guest workload part % qemu-system-ppcemb ... % kill the 44x_instr command % python decode_instr.py instrlog.bin # can be run on any system The python script decodes extra informations for some opcodes e.g. sprn for m[ft]spr An example line: time: instr @ pc rsval raval rbval mnemonic - context info 0.892007422: 7c700aa6 @ 1c 0 0 0 mfspr - sprn 0x030 PID 0.892007422: 7c8000a6 @ 20 0 0 0 mfmsr 0.892007422: 7c72eba6 @ 30 0 0 0 mtspr - sprn 0x3b2 MMUCR 0.892007422: 7ee02f24 @ 40 0 0 3c@r05 tlbsx 0.892007422: 7c6407a4 @ 54 0 1@r04 0 tlbwe - ws -> PAGEID - Time helps to find relations what the guest did in that moment - instruction is the full opcode - pc the program counter helping developers to analyze where that instr came from e.g. check guest image with objdump and look for these addresses - r*val - the value in the used register, additionally the number of the used register is printed e.g. 1@r04 means r4 is used in that instruction and contains "1" - mnemonic is the name of that instruction - context info decodes special information for some instruction types (can be extended as needed) - sprn for m[ft]spr - spr name for m[ft]spr - dcrn for m[ft]dcr - tlbwe action type encoded in "ws" -- Grüsse / regards, Christian Ehrhardt IBM Linux Technology Center, Open Virtualization