From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Laurent Vivier <laurent@vivier.eu>, Warner Losh <imp@bsdimp.com>,
Kyle Evans <kevans@freebsd.org>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [RFC PATCH 1/5] Rename the singlestep global variable to one_insn_per_tb
Date: Mon, 6 Feb 2023 21:20:43 +0100 [thread overview]
Message-ID: <8669ea09-05b4-b17f-aa85-9943071232d3@redhat.com> (raw)
In-Reply-To: <20230206171359.1327671-2-peter.maydell@linaro.org>
On 06/02/2023 18.13, Peter Maydell wrote:
> The 'singlestep' global variable is badly misnamed, because it has
> nothing to do with single-stepping the emulation either via the gdb
> stub or by emulation of architectural debug facilities. Instead what
> it does is force TCG to put only one instruction into each TB.
> Rename it to one_insn_per_tb, so that it reflects what it does better
> and is easier to search for in the codebase.
>
> This misnaming is also present in user-facing interfaces: the command
> line option '-singlestep', the HMP 'singlestep' command, and the QMP
> StatusInfo object. Those are harder to update because we need to
> retain backwards compatibility. Subsequent patches will add
> better-named aliases so we can eventually deprecate-and-drop the old,
> bad name.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> include/exec/cpu-common.h | 2 +-
> accel/tcg/cpu-exec.c | 4 ++--
> bsd-user/main.c | 4 ++--
> linux-user/main.c | 4 ++--
> softmmu/globals.c | 2 +-
> softmmu/runstate-hmp-cmds.c | 4 ++--
> softmmu/runstate.c | 2 +-
> softmmu/vl.c | 2 +-
> 8 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
> index 6feaa40ca7b..f2592a1967f 100644
> --- a/include/exec/cpu-common.h
> +++ b/include/exec/cpu-common.h
> @@ -163,7 +163,7 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
> void *ptr, size_t len, bool is_write);
>
> /* vl.c */
> -extern int singlestep;
> +extern int one_insn_per_tb;
IMHO the global variable should completely go away - this should get a
property of the tcg accel instead.
Thomas
next prev parent reply other threads:[~2023-02-06 20:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 17:13 [RFC PATCH 0/5] Deprecate/rename singlestep command line option Peter Maydell
2023-02-06 17:13 ` [RFC PATCH 1/5] Rename the singlestep global variable to one_insn_per_tb Peter Maydell
2023-02-06 20:20 ` Thomas Huth [this message]
2023-02-10 16:48 ` Peter Maydell
2023-02-06 17:13 ` [RFC PATCH 2/5] linux-user: Add '-one-insn-per-tb' option equivalent to '-singlestep' Peter Maydell
2023-02-06 17:13 ` [RFC PATCH 3/5] bsd-user: " Peter Maydell
2023-02-06 17:13 ` [RFC PATCH 4/5] softmmu: " Peter Maydell
2023-02-06 17:13 ` [RFC PATCH 5/5] hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep' Peter Maydell
2023-02-06 18:18 ` [RFC PATCH 0/5] Deprecate/rename singlestep command line option Richard Henderson
2023-02-06 20:17 ` Thomas Huth
2023-02-07 11:01 ` Peter Maydell
2023-02-07 11:33 ` Thomas Huth
2023-02-07 15:56 ` Markus Armbruster
2023-02-08 23:04 ` Warner Losh
2023-02-13 15:01 ` Dr. David Alan Gilbert
2023-04-03 12:47 ` Peter Maydell
2023-04-03 14:41 ` Markus Armbruster
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=8669ea09-05b4-b17f-aa85-9943071232d3@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).