aboutsummaryrefslogtreecommitdiff
path: root/scripts/performance
AgeCommit message (Collapse)Author
2020-07-14scripts/performance: Add dissect.py scriptAhmed Karaman
Python script that dissects QEMU execution into three main phases: code generation, JIT execution and helpers execution. Syntax: dissect.py [-h] -- <qemu executable> [<qemu executable options>] \ <target executable> [<target executable options>] [-h] - Print the script arguments help message. Example of usage: dissect.py -- qemu-arm coulomb_double-arm Example output: Total Instructions: 4,702,865,362 Code Generation: 115,819,309 2.463% JIT Execution: 1,081,980,528 23.007% Helpers: 3,505,065,525 74.530% Signed-off-by: Ahmed Karaman <ahmedkhaledkaraman@gmail.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200709052055.2650-2-ahmedkhaledkaraman@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-06-27scripts/performance: Add topN_callgrind.py scriptAhmed Karaman
Python script that prints the top N most executed functions in QEMU using callgrind. Syntax: topN_callgrind.py [-h] [-n] <number of displayed top functions> -- \ <qemu executable> [<qemu executable options>] \ <target executable> [<target execurable options>] [-h] - Print the script arguments help message. [-n] - Specify the number of top functions to print. - If this flag is not specified, the tool defaults to 25. Example of usage: topN_callgrind.py -n 20 -- qemu-arm coulomb_double-arm Example Output: No. Percentage Function Name Source File ---- --------- ------------------ ------------------------------ 1 24.577% 0x00000000082db000 ??? 2 20.467% float64_mul <qemu>/fpu/softfloat.c 3 14.720% float64_sub <qemu>/fpu/softfloat.c 4 13.864% float64_add <qemu>/fpu/softfloat.c 5 4.876% helper_mulsd <qemu>/target/i386/ops_sse.h 6 3.767% helper_subsd <qemu>/target/i386/ops_sse.h 7 3.549% helper_addsd <qemu>/target/i386/ops_sse.h 8 2.185% helper_ucomisd <qemu>/target/i386/ops_sse.h 9 1.667% helper_lookup_tb_ptr <qemu>/include/exec/tb-lookup.h 10 1.662% f64_compare <qemu>/fpu/softfloat.c 11 1.509% helper_lookup_tb_ptr <qemu>/accel/tcg/tcg-runtime.c 12 0.635% helper_lookup_tb_ptr <qemu>/include/exec/exec-all.h 13 0.616% float64_div <qemu>/fpu/softfloat.c 14 0.502% helper_pand_xmm <qemu>/target/i386/ops_sse.h 15 0.502% float64_mul <qemu>/include/fpu/softfloat.h 16 0.476% helper_lookup_tb_ptr <qemu>/target/i386/cpu.h 17 0.437% float64_compare_quiet <qemu>/fpu/softfloat.c 18 0.414% helper_pxor_xmm <qemu>/target/i386/ops_sse.h 19 0.353% round_to_int <qemu>/fpu/softfloat.c 20 0.347% helper_cc_compute_all <qemu>/target/i386/cc_helper.c Signed-off-by: Ahmed Karaman <ahmedkhaledkaraman@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200626164546.22102-3-ahmedkhaledkaraman@gmail.com>
2020-06-27scripts/performance: Add topN_perf.py scriptAhmed Karaman
Syntax: topN_perf.py [-h] [-n] <number of displayed top functions> -- \ <qemu executable> [<qemu executable options>] \ <target executable> [<target execurable options>] [-h] - Print the script arguments help message. [-n] - Specify the number of top functions to print. - If this flag is not specified, the tool defaults to 25. Example of usage: topN_perf.py -n 20 -- qemu-arm coulomb_double-arm Example Output: No. Percentage Name Invoked by ---- ---------- ------------------------- ------------------------- 1 16.25% float64_mul qemu-x86_64 2 12.01% float64_sub qemu-x86_64 3 11.99% float64_add qemu-x86_64 4 5.69% helper_mulsd qemu-x86_64 5 4.68% helper_addsd qemu-x86_64 6 4.43% helper_lookup_tb_ptr qemu-x86_64 7 4.28% helper_subsd qemu-x86_64 8 2.71% f64_compare qemu-x86_64 9 2.71% helper_ucomisd qemu-x86_64 10 1.04% helper_pand_xmm qemu-x86_64 11 0.71% float64_div qemu-x86_64 12 0.63% helper_pxor_xmm qemu-x86_64 13 0.50% 0x00007f7b7004ef95 [JIT] tid 491 14 0.50% 0x00007f7b70044e83 [JIT] tid 491 15 0.36% helper_por_xmm qemu-x86_64 16 0.32% helper_cc_compute_all qemu-x86_64 17 0.30% 0x00007f7b700433f0 [JIT] tid 491 18 0.30% float64_compare_quiet qemu-x86_64 19 0.27% soft_f64_addsub qemu-x86_64 20 0.26% round_to_int qemu-x86_64 Signed-off-by: Ahmed Karaman <ahmedkhaledkaraman@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <20200626164546.22102-2-ahmedkhaledkaraman@gmail.com>