[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 13/24] replay: implement replay-seek command
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v10 13/24] replay: implement replay-seek command |
Date: |
Thu, 17 Jan 2019 14:30:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Pavel Dovgalyuk <address@hidden> writes:
> This patch adds hmp/qmp commands replay_seek/replay-seek that proceed
> the execution to the specified instruction count.
> The command automatically loads nearest snapshot and replays the execution
> to find the desired instruction count.
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
>
> --
>
> v2:
> - renamed replay_seek qmp command into replay-seek
> (suggested by Eric Blake)
> v7:
> - small fixes related to Markus Armbruster's review
> v9:
> - changed 'step' parameter name to 'icount'
> - moved json stuff to replay.json and updated the description
> (suggested by Markus Armbruster)
> v10:
> - updated the descriptions
> ---
> hmp-commands.hx | 19 +++++++++
> hmp.h | 1
> qapi/replay.json | 20 ++++++++++
> replay/replay-debugging.c | 92
> +++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 132 insertions(+)
>
> diff --git a/hmp-commands.hx b/hmp-commands.hx
> index d529f24..57ec43c 100644
> --- a/hmp-commands.hx
> +++ b/hmp-commands.hx
> @@ -1924,6 +1924,25 @@ The command is ignored when there are no replay
> breakpoints.
> ETEXI
>
> {
> + .name = "replay_seek",
> + .args_type = "icount:i",
> + .params = "icount",
> + .help = "replay execution to the specified instruction count",
> + .cmd = hmp_replay_seek,
> + },
> +
> +STEXI
> address@hidden replay_seek @var{icount}
> address@hidden replay_seek
> +Automatically proceeds to the instruction count @var{icount}, when
> +replaying the execution. The command automatically loads nearest
> +snapshot and replays the execution to find the desired instruction.
> +When there is no preceding snapshot or the execution is not replayed,
> +then the command is ignored and error message is displayed.
Sounds like roundabout way to say "then the command fails". If that's
correct, then let's phrase it that way.
> +icount for the reference may be observed with 'info replay' command.
> +ETEXI
> +
> + {
> .name = "info",
> .args_type = "item:s?",
> .params = "[subcommand]",
> diff --git a/hmp.h b/hmp.h
> index c9b9b4f..d6e1d7e 100644
> --- a/hmp.h
> +++ b/hmp.h
> @@ -151,5 +151,6 @@ void hmp_info_sev(Monitor *mon, const QDict *qdict);
> void hmp_info_replay(Monitor *mon, const QDict *qdict);
> void hmp_replay_break(Monitor *mon, const QDict *qdict);
> void hmp_replay_delete_break(Monitor *mon, const QDict *qdict);
> +void hmp_replay_seek(Monitor *mon, const QDict *qdict);
>
> #endif
> diff --git a/qapi/replay.json b/qapi/replay.json
> index cb94991..0b5afce 100644
> --- a/qapi/replay.json
> +++ b/qapi/replay.json
> @@ -99,3 +99,23 @@
> #
> ##
> { 'command': 'replay-delete-break' }
> +
> +##
> +# @replay-seek:
> +#
> +# Automatically proceeds to the instruction count @icount, when
> +# replaying the execution. The command automatically loads nearest
> +# snapshot and replays the execution to find the desired instruction.
> +# When there is no preceding snapshot or the execution is not replayed,
> +# then the command is ignored and error is returned.
> +# icount for the reference may be obtained with @query-replay command.
My comment on hmp-commands.hx applies.
> +#
> +# @icount: target instruction count
> +#
> +# Since: 4.0
> +#
> +# Example:
> +#
> +# -> { "execute": "replay-seek", "data": { "icount": 220414 } }
> +##
> +{ 'command': 'replay-seek', 'data': { 'icount': 'int' } }
[...]
QAPI schema part
Acked-by: Markus Armbruster <address@hidden>
Please consider my comment suggestions regardless.
- [Qemu-devel] [PATCH v10 09/24] replay: provide an accessor for rr filename, (continued)
- [Qemu-devel] [PATCH v10 09/24] replay: provide an accessor for rr filename, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 08/24] migration: introduce icount field for snapshots, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 10/24] qapi: introduce replay.json for record/replay-related stuff, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 11/24] replay: introduce info hmp/qmp command, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 12/24] replay: introduce breakpoint at the specified step, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 13/24] replay: implement replay-seek command, Pavel Dovgalyuk, 2019/01/17
- Re: [Qemu-devel] [PATCH v10 13/24] replay: implement replay-seek command,
Markus Armbruster <=
- [Qemu-devel] [PATCH v10 14/24] replay: refine replay-time module, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 15/24] replay: flush rr queue before loading the vmstate, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 16/24] gdbstub: add reverse step support in replay mode, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 18/24] replay: describe reverse debugging in docs/replay.txt, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 17/24] gdbstub: add reverse continue support in replay mode, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 19/24] replay: add BH oneshot event for block layer, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 20/24] replay: init rtc after enabling the replay, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 21/24] replay: document development rules, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 22/24] util/qemu-timer: refactor deadline calculation for external timers, Pavel Dovgalyuk, 2019/01/17
- [Qemu-devel] [PATCH v10 23/24] replay: fix replay shutdown, Pavel Dovgalyuk, 2019/01/17