From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-block@nongnu.org, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>,
Fam Zheng <fam@euphon.net>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 3/6] sysemu/cpu-timers: Introduce ICountMode enumerator
Date: Fri, 8 Dec 2023 14:05:19 +0100 [thread overview]
Message-ID: <5f9513ff-1a41-4f83-8ff0-eeb550ea2eef@linaro.org> (raw)
In-Reply-To: <20231208113529.74067-4-philmd@linaro.org>
On 8/12/23 12:35, Philippe Mathieu-Daudé wrote:
> Rather than having to lookup for what the 0, 1, 2, ...
> icount values are, use a enum definition.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/sysemu/cpu-timers.h | 20 +++++++++++++-------
> accel/tcg/icount-common.c | 16 +++++++---------
> stubs/icount.c | 2 +-
> system/cpu-timers.c | 2 +-
> target/arm/helper.c | 3 ++-
> 5 files changed, 24 insertions(+), 19 deletions(-)
>
> diff --git a/include/sysemu/cpu-timers.h b/include/sysemu/cpu-timers.h
> index b70dc7692d..3f05f29b10 100644
> --- a/include/sysemu/cpu-timers.h
> +++ b/include/sysemu/cpu-timers.h
> @@ -17,18 +17,24 @@ void cpu_timers_init(void);
>
> /* icount - Instruction Counter API */
>
> -/*
> - * icount enablement state:
> +/**
> + * ICountMode: icount enablement state:
> *
> - * 0 = Disabled - Do not count executed instructions.
> - * 1 = Enabled - Fixed conversion of insn to ns via "shift" option
> - * 2 = Enabled - Runtime adaptive algorithm to compute shift
> + * @ICOUNT_DISABLED: Disabled - Do not count executed instructions.
> + * @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option
> + * @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift
> */
> +typedef enum {
> + ICOUNT_DISABLED = 0,
> + ICOUNT_PRECISE,
> + ICOUNT_ADAPTATIVE,
> +} ICountMode;
Per v2:
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
next prev parent reply other threads:[~2023-12-08 13:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 11:35 [PATCH v3 0/6] sysemu/replay: Restrict icount to TCG system emulation Philippe Mathieu-Daudé
2023-12-08 11:35 ` [PATCH v3 1/6] sysemu/cpu-timers: Have icount_configure() return a boolean Philippe Mathieu-Daudé
2023-12-08 17:54 ` Richard Henderson
2023-12-08 11:35 ` [PATCH v3 2/6] system/vl: Evaluate icount after accelerator options are parsed Philippe Mathieu-Daudé
2023-12-08 17:56 ` Richard Henderson
2023-12-08 11:35 ` [PATCH v3 3/6] sysemu/cpu-timers: Introduce ICountMode enumerator Philippe Mathieu-Daudé
2023-12-08 13:05 ` Philippe Mathieu-Daudé [this message]
2023-12-08 11:35 ` [PATCH v3 4/6] target/arm: Ensure icount is enabled when emulating INST_RETIRED Philippe Mathieu-Daudé
2023-12-08 17:59 ` Richard Henderson
2023-12-08 11:35 ` [PATCH v3 5/6] util/async: Only call icount_notify_exit() if icount is enabled Philippe Mathieu-Daudé
2023-12-08 18:01 ` Richard Henderson
2023-12-08 11:35 ` [PATCH v3 6/6] sysemu/replay: Restrict icount to system emulation Philippe Mathieu-Daudé
2023-12-08 18:03 ` Richard Henderson
2024-01-17 8:21 ` [PATCH v3 0/6] sysemu/replay: Restrict icount to TCG " Philippe Mathieu-Daudé
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=5f9513ff-1a41-4f83-8ff0-eeb550ea2eef@linaro.org \
--to=philmd@linaro.org \
--cc=fam@euphon.net \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.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).