qemu-patch-raspberry4/scripts
Ahmed Karaman 5c362ccfde scripts/performance: Add topN_callgrind.py script
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-27 20:07:59 +02:00
..
coccinelle scripts/coccinelle: add error-use-after-free.cocci 2020-04-04 14:14:09 +02:00
coverity-scan * Miscellaneous fixes and feature enablement (many) 2020-06-12 23:06:22 +01:00
kvm scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main() 2020-05-31 13:56:46 +02:00
modules scripts/modules/module_block: Use Python 3 interpreter & add pseudo-main 2020-05-31 13:56:46 +02:00
oss-fuzz fuzz: add oss-fuzz build-script 2020-06-15 18:26:46 +02:00
performance scripts/performance: Add topN_callgrind.py script 2020-06-27 20:07:59 +02:00
qapi qapi: Generate simpler marshalling code when no arguments 2020-04-30 07:26:41 +02:00
qemu-guest-agent
qemugdb scripts/qemugdb: Remove shebang header 2020-05-31 13:56:46 +02:00
qmp python: remove more instances of sys.version_info 2020-05-31 18:25:07 +02:00
simplebench scripts/simplebench: add example usage of simplebench 2020-03-17 21:09:26 -04:00
tracetool scripts/tracetool: Update maintainer email address 2020-06-24 11:21:00 +01:00
travis
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py
analyze-inclusions
analyze-migration.py python: remove more instances of sys.version_info 2020-05-31 18:25:07 +02:00
archive-source.sh
checkpatch.pl checkpatch: reversed logic with acpi test checks 2020-06-12 11:20:14 -04:00
clean-header-guards.pl
clean-includes scripts/clean-includes: Mark 'qemu/qemu-plugin.h' as special header 2020-06-08 16:59:29 +01:00
cleanup-trace-events.pl
cocci-macro-file.h
coverity-model.c
create_config
decodetree.py decodetree: Drop check for less than 2 patterns in a group 2020-06-09 09:19:48 -07:00
device-crash-test
disas-objdump.pl
dump-guest-memory.py
extract-vsssdk-headers
feature_to_c.sh
fix-multiline-comments.sh
gensyscalls.sh scripts: add a script to generate syscall_nr.h 2020-03-20 16:02:00 +01:00
get_maintainer.pl
git-submodule.sh
git.orderfile
hxtool
hxtool-conv.pl
kernel-doc kernel-doc: Use c:struct for Sphinx 3.0 and later 2020-04-14 17:15:33 +01:00
make-release
minikconf.py minikconf: explicitly set encoding to UTF-8 2020-06-23 15:46:05 +01:00
qapi-gen.py
qemu-binfmt-conf.sh
qemu-gdb.py scripts/qemu-gdb: Use Python 3 interpreter 2020-05-31 13:56:46 +02:00
qemu-trace-stap
refresh-pxe-roms.sh
render_block_graph.py
replay-dump.py
shaderinclude.pl
show-fixed-bugs.sh
signrom.py
simpletrace.py
switch-timer-api
tap-driver.pl
tap-merge.pl
texi2pod.pl
tracetool.py scripts/tracetool: Update maintainer email address 2020-06-24 11:21:00 +01:00
update-linux-headers.sh
update-mips-syscall-args.sh linux-user,mips: update syscall-args-o32.c.inc 2020-03-20 16:02:00 +01:00
update-syscalltbl.sh linux-user, scripts: add a script to update syscall.tbl 2020-03-20 16:02:00 +01:00
vmstate-static-checker.py