qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fei Wu <fei2.wu@intel.com>
To: richard.henderson@linaro.org, pbonzini@redhat.com,
	alex.bennee@linaro.org, erdnaxe@crans.org, ma.mandourr@gmail.com,
	qemu-devel@nongnu.org
Cc: Fei Wu <fei2.wu@intel.com>
Subject: [PATCH 0/2] accel/tcg/plugin: host insn size for plugin
Date: Thu,  6 Apr 2023 10:27:49 +0800	[thread overview]
Message-ID: <20230406022751.757980-1-fei2.wu@intel.com> (raw)

The translation ratio of host to guest instruction count is one of the
key performance factor of binary translation. It's better to have this
kind of information exported to plugin for analysis. As the host insn
size is not determined at guest->IR time, its address is recorded for
later dereference, and plugin inline mode is not supported.

Here is an example of the output with modified plugin hotblocks:

    pc, tcount, icount, ecount, host isize
    0xffffffff8041ad6c, 1, 9, 130450345, 456
    0xffffffff800084f0, 1, 9, 88273714, 264
    0xffffffff800084e4, 1, 3, 88264146, 135
    0xffffffff8041abd0, 1, 1, 46032689, 123
    0xffffffff8041ab3c, 1, 1, 46021650, 123
    0xffffffff8045ffe8, 1, 5, 40927215, 328

Fei Wu (2):
  accel/tcg/plugin: export host insn size
  plugins/hotblocks: add host insn size

 accel/tcg/plugin-gen.c       |  1 +
 contrib/plugins/hotblocks.c  | 24 +++++++++++++++---------
 include/qemu/plugin.h        |  2 ++
 include/qemu/qemu-plugin.h   |  8 ++++++++
 plugins/api.c                |  5 +++++
 plugins/qemu-plugins.symbols |  1 +
 6 files changed, 32 insertions(+), 9 deletions(-)

-- 
2.25.1



             reply	other threads:[~2023-04-06  2:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  2:27 Fei Wu [this message]
2023-04-06  2:27 ` [PATCH 1/2] accel/tcg/plugin: export host insn size Fei Wu
2023-04-06  7:46   ` Alex Bennée
2023-04-07  1:31     ` Wu, Fei
2023-04-10 10:46       ` Alex Bennée
2023-04-08  3:34     ` Richard Henderson
2023-04-10 10:36       ` Alex Bennée
2023-04-10 13:02         ` Wu, Fei
2023-04-11  7:27           ` Alex Bennée
2023-04-12 12:50             ` Wu, Fei
2023-04-12 13:28               ` Alex Bennée
2023-04-12 13:47                 ` Wu, Fei
2023-04-17 11:11             ` Wu, Fei
2023-04-17 12:11               ` Alex Bennée
2023-04-17 13:01                 ` Wu, Fei
2023-04-21 13:46                   ` Wu, Fei
2023-04-06  2:27 ` [PATCH 2/2] plugins/hotblocks: add " Fei Wu
2023-04-06  7:54   ` Alex Bennée

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=20230406022751.757980-1-fei2.wu@intel.com \
    --to=fei2.wu@intel.com \
    --cc=alex.bennee@linaro.org \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).