Skip to content

Measure Tiny Code Generation Quality

vandersonmr qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest11 patches 12 repliesIn review
  2. v710 patches 0 repliesSuperseded
  3. v610 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v510 patches10 repliesSuperseded
v47 patches10 repliesSuperseded

Changes in v8 from the cover letter

- fixing missing commit from v7

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11accel: introducing TBStatistics structureaccel/tcg/Makefile.objs accel/tcg/tb-stats.c accel/tcg/translate-all.c +5 more+213 -121 reply
2/11accel: collecting TB execution countaccel/tcg/cpu-exec.c accel/tcg/tb-stats.c accel/tcg/tcg-runtime.c +6 more+55 -03 replies
3/11accel: collecting JIT statisticsaccel/tcg/translate-all.c accel/tcg/translator.c include/exec/tb-stats.h +2 more+58 -11 reply
4/11accel: replacing part of CONFIG_PROFILER with TBStatsaccel/tcg/tb-stats.c accel/tcg/translate-all.c include/exec/tb-stats.h +2 more+119 -990 replies
5/11accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILERaccel/tcg/tb-stats.c accel/tcg/translate-all.c configure +7 more+156 -1931 reply
6/11Adding -d tb_stats to control TBStatistics collection:include/exec/gen-icount.h include/exec/tb-stats-flags.h include/exec/tb-stats.h +2 more+82 -151 reply
7/11monitor: adding tb_stats hmp commandaccel/tcg/tb-stats.c hmp-commands.hx include/exec/tb-stats-flags.h +3 more+192 -01 reply
8/11Adding tb_stats [start|pause|stop|filter] command to hmp.monitor/misc.c+2 -01 reply
9/11Adding info [tb-list|tb|coverset] commands to HMP.accel/tcg/tb-stats.c accel/tcg/translate-all.c disas.c +6 more+634 -211 reply
10/11monitor: adding new info cfg commandaccel/tcg/tb-stats.c hmp-commands-info.hx include/exec/tb-stats.h +1 more+194 -01 reply
11/11linux-user: dumping hot TBs at the end of the executionlinux-user/exit.c+4 -00 replies

Reviews trailers per patch

6 of 11 patches have a Reviewed-by or Acked-by.

PatchAlex BennéeDr. David Alan Gilbert
1/11R-b
2/11
3/11R-b
4/11R-b
5/11
6/11
7/11A-b
8/11A-b
9/11A-b
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [Qemu-devel] [PATCH v8 00/11] Measure Tiny Code Generation Quality

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.

v8:
- fixing missing commit from v7
v7:
- rebase
- adding license to new files
- applying comments from v6
v6:
- applying comments from V5.
- change info tbs to info tb-list
- fix crash when dumping tb's targets
- fix "liveness/code time" calculation
v5:
- full replacement of CONFIG_PROFILER
- several fixes
- adds "info cfg"
- adds TB's targets to dump

vandersonmr (11):
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 Adding -d tb_stats to control TBStatistics collection:
monitor: adding tb_stats hmp command
Adding tb_stats [start|pause|stop|filter] command to hmp. Adding info [tb-list|tb|coverset] commands to HMP.
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/tb-stats.c          | 894 ++++++++++++++++++++++++++++++++++
 accel/tcg/tcg-runtime.c       |   7 +
 accel/tcg/tcg-runtime.h       |   2 +
 accel/tcg/translate-all.c     | 132 +++--
 accel/tcg/translator.c        |   5 +
 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-flags.h |  43 ++
 include/exec/tb-stats.h       | 170 +++++++
 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                     | 230 +++------
 tcg/tcg.h                     |  22 +-
 util/log.c                    |  90 +++-
 vl.c                          |   8 +-
 27 files changed, 1652 insertions(+), 284 deletions(-)
 create mode 100644 accel/tcg/tb-stats.c
 create mode 100644 include/exec/tb-stats-flags.h
 create mode 100644 include/exec/tb-stats.h
Signature · 1 line
2.22.0