From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: vandersonmr <vandersonmr2@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v4 0/7] Measure Tiny Code Generation Quality
Date: Fri, 26 Jul 2019 13:51:38 +0100 [thread overview]
Message-ID: <87tvb9gdr9.fsf@linaro.org> (raw)
In-Reply-To: <20190720010235.32444-1-vandersonmr2@gmail.com>
vandersonmr <vandersonmr2@gmail.com> writes:
> 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.
Hmm with:
-d tb_stats:10:all
I'm seeing the following bt:
Thread 4 "qemu-system-aar" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe5285700 (LWP 898)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff51787bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff5163535 in __GI_abort () at abort.c:79
#2 0x0000555555bab663 in OP_E (bytemode=2, sizeflag=3) at /home/alex/lsrc/qemu.git/disas/i386.c:5094
#3 0x0000555555ba972f in print_insn (pc=140735911299712, info=0x7fffe5281c00) at /home/alex/lsrc/qemu.git/disas/i386.c:4071
#4 0x0000555555ba8623 in print_insn_i386 (pc=140735911299712, info=0x7fffe5281c00) at /home/alex/lsrc/qemu.git/disas/i386.c:3705
#5 0x0000555555881241 in get_num_insts (code=0x7fffa2000a80 <code_gen_buffer+33557075>, size=88) at /home/alex/lsrc/qemu.git/disas.c:575
#6 0x00005555558d89f1 in tb_gen_code (cpu=0x555556a1f6a0, pc=18446743524230025728, cs_base=0, flags=2415924229, cflags=-16252928) at /home/alex/lsrc/qemu.git/accel/tcg/translate-all.c:1881
#7 0x00005555558d4984 in tb_find (cpu=0x555556a1f6a0, last_tb=0x0, tb_exit=0, cf_mask=524288) at /home/alex/lsrc/qemu.git/accel/tcg/cpu-exec.c:409
#8 0x00005555558d524f in cpu_exec (cpu=0x555556a1f6a0) at /home/alex/lsrc/qemu.git/accel/tcg/cpu-exec.c:731
#9 0x0000555555884806 in tcg_cpu_exec (cpu=0x555556a1f6a0) at /home/alex/lsrc/qemu.git/cpus.c:1435
#10 0x000055555588505c in qemu_tcg_cpu_thread_fn (arg=0x555556a1f6a0) at /home/alex/lsrc/qemu.git/cpus.c:1743
#11 0x0000555556010875 in qemu_thread_start (args=0x555556a75450) at /home/alex/lsrc/qemu.git/util/qemu-thread-posix.c:502
#12 0x00007ffff530bfa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#13 0x00007ffff523a4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
>
> Collecting these statistics and information is useful to understand
> qemu performance and to help to add the support for traces to QEMU.
>
> vandersonmr (7):
> accel: introducing TBStatistics structure
> accel: collecting TB execution count
> accel: collecting JIT statistics
> accel: replacing part of CONFIG_PROFILER with TBStats
> log: adding -d tb_stats to control tbstats
> monitor: adding tb_stats hmp command
> monitor: adding info tbs, tb, and coverset
>
> accel/tcg/Makefile.objs | 2 +-
> accel/tcg/tb-stats.c | 489 +++++++++++++++++++++++++++++++++++
> accel/tcg/tcg-runtime.c | 7 +
> accel/tcg/tcg-runtime.h | 2 +
> accel/tcg/translate-all.c | 93 ++++++-
> accel/tcg/translator.c | 6 +
> disas.c | 108 ++++++++
> hmp-commands-info.hx | 23 ++
> hmp-commands.hx | 17 ++
> include/disas/disas.h | 1 +
> include/exec/exec-all.h | 15 +-
> include/exec/gen-icount.h | 9 +
> include/exec/tb-context.h | 12 +
> include/exec/tb-hash.h | 7 +
> include/exec/tb-stats.h | 113 ++++++++
> include/qemu/log-for-trace.h | 2 +
> include/qemu/log.h | 16 ++
> linux-user/exit.c | 4 +
> monitor/misc.c | 111 ++++++++
> tcg/tcg.c | 114 +++-----
> tcg/tcg.h | 12 +-
> util/log.c | 99 ++++++-
> 22 files changed, 1144 insertions(+), 118 deletions(-)
> create mode 100644 accel/tcg/tb-stats.c
> create mode 100644 include/exec/tb-stats.h
--
Alex Bennée
prev parent reply other threads:[~2019-07-26 12:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-20 1:02 [Qemu-devel] [PATCH v4 0/7] Measure Tiny Code Generation Quality vandersonmr
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 1/7] accel: introducing TBStatistics structure vandersonmr
2019-07-26 11:56 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 2/7] accel: collecting TB execution count vandersonmr
2019-07-26 13:38 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 3/7] accel: collecting JIT statistics vandersonmr
2019-07-26 14:46 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 4/7] accel: replacing part of CONFIG_PROFILER with TBStats vandersonmr
2019-07-26 15:25 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 5/7] log: adding -d tb_stats to control tbstats vandersonmr
2019-07-26 16:20 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 6/7] monitor: adding tb_stats hmp command vandersonmr
2019-07-26 16:57 ` Alex Bennée
2019-07-20 1:02 ` [Qemu-devel] [PATCH v4 7/7] monitor: adding info tbs, tb, and coverset vandersonmr
2019-07-26 18:17 ` Alex Bennée
2019-07-29 11:01 ` Alex Bennée
2019-07-29 15:20 ` Alex Bennée
2019-07-26 12:51 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvb9gdr9.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=vandersonmr2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).