[Qemu-devel] [PATCH v5 00/10] Measure Tiny Code Generation Quality

vandersonmr posted 10 patches 4 years, 8 months ago
Test FreeBSD passed
Test docker-mingw@fedora passed
Test asan passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test s390x failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190815021857.19526-1-vandersonmr2@gmail.com
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Richard Henderson <rth@twiddle.net>, Markus Armbruster <armbru@redhat.com>, Riku Voipio <riku.voipio@iki.fi>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <laurent@vivier.eu>
There is a newer version of this series
accel/tcg/Makefile.objs      |   2 +-
accel/tcg/cpu-exec.c         |   4 +
accel/tcg/perf/Makefile.objs |   1 +
accel/tcg/tb-stats.c         | 865 +++++++++++++++++++++++++++++++++++
accel/tcg/tcg-runtime.c      |   7 +
accel/tcg/tcg-runtime.h      |   2 +
accel/tcg/translate-all.c    | 133 ++++--
accel/tcg/translator.c       |   6 +
configure                    |   3 -
cpus.c                       |  14 +-
disas.c                      |  31 +-
hmp-commands-info.hx         |  31 ++
hmp-commands.hx              |  17 +
include/exec/exec-all.h      |  15 +-
include/exec/gen-icount.h    |  10 +
include/exec/tb-context.h    |  12 +
include/exec/tb-hash.h       |   7 +
include/exec/tb-stats.h      | 142 ++++++
include/qemu-common.h        |  16 +
include/qemu/log-for-trace.h |   4 +
include/qemu/log.h           |   3 +
include/qemu/timer.h         |   5 +-
linux-user/exit.c            |   4 +
monitor/misc.c               | 171 ++++++-
tcg/tcg.c                    | 231 +++-------
tcg/tcg.h                    |  22 +-
util/log.c                   |  90 +++-
vl.c                         |   8 +-
28 files changed, 1572 insertions(+), 284 deletions(-)
create mode 100644 accel/tcg/perf/Makefile.objs
create mode 100644 accel/tcg/tb-stats.c
create mode 100644 include/exec/tb-stats.h
[Qemu-devel] [PATCH v5 00/10] Measure Tiny Code Generation Quality
Posted by vandersonmr 4 years, 8 months ago
This patch is part of Google Summer of Code (GSoC) 2019.
More about the project can be found in:
https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality

The goal of this patch is to add infrastructure to collect
execution and JIT statistics during the emulation with accel/TCG.
The statistics are stored in TBStatistic structures (TBStats)
with each TB having its respective TBStats.

We added -d tb_stats and HMP tb_stats commands to allow the control
of this statistics collection. And info tb, tbs, and coverset commands
were also added to allow dumping and exploring all this information
while emulating.

Collecting these statistics and information is useful to understand
qemu performance and to help to add the support for traces to QEMU. 

v5:
 - full replacement of CONFIG_PROFILER
 - several fixes
 - adds "info cfg"
 - adds TB's targets to dump

vandersonmr (10):
  accel: introducing TBStatistics structure
  accel: collecting TB execution count
  accel: collecting JIT statistics
  accel: replacing part of CONFIG_PROFILER with TBStats
  accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILER
  log: adding -d tb_stats to control tbstats
  monitor: adding tb_stats hmp command
  Adding info [tbs|tb|coverset] commands to HMP. These commands allow
    the exploration of TBs generated by the TCG. Understand which one
    hotter, with more guest/host instructions... and examine their
    guest, host and IR code.
  monitor: adding new info cfg command
  linux-user: dumping hot TBs at the end of the execution

 accel/tcg/Makefile.objs      |   2 +-
 accel/tcg/cpu-exec.c         |   4 +
 accel/tcg/perf/Makefile.objs |   1 +
 accel/tcg/tb-stats.c         | 865 +++++++++++++++++++++++++++++++++++
 accel/tcg/tcg-runtime.c      |   7 +
 accel/tcg/tcg-runtime.h      |   2 +
 accel/tcg/translate-all.c    | 133 ++++--
 accel/tcg/translator.c       |   6 +
 configure                    |   3 -
 cpus.c                       |  14 +-
 disas.c                      |  31 +-
 hmp-commands-info.hx         |  31 ++
 hmp-commands.hx              |  17 +
 include/exec/exec-all.h      |  15 +-
 include/exec/gen-icount.h    |  10 +
 include/exec/tb-context.h    |  12 +
 include/exec/tb-hash.h       |   7 +
 include/exec/tb-stats.h      | 142 ++++++
 include/qemu-common.h        |  16 +
 include/qemu/log-for-trace.h |   4 +
 include/qemu/log.h           |   3 +
 include/qemu/timer.h         |   5 +-
 linux-user/exit.c            |   4 +
 monitor/misc.c               | 171 ++++++-
 tcg/tcg.c                    | 231 +++-------
 tcg/tcg.h                    |  22 +-
 util/log.c                   |  90 +++-
 vl.c                         |   8 +-
 28 files changed, 1572 insertions(+), 284 deletions(-)
 create mode 100644 accel/tcg/perf/Makefile.objs
 create mode 100644 accel/tcg/tb-stats.c
 create mode 100644 include/exec/tb-stats.h

-- 
2.22.0