qemu/qapi/replay.json
John Snow 14b48aaab9 qapi: convert "Example" sections without titles
Use the no-option form of ".. qmp-example::" to convert any Examples
that do not have any form of caption or explanation whatsoever. Note
that in a few cases, example sections are split into two or more
separate example blocks. This is only done stylistically to create a
delineation between two or more logically independent examples.

See commit-3: "docs/qapidoc: create qmp-example directive", for a
              detailed explanation of this custom directive syntax.

See commit+3: "qapi: remove "Example" doc section" for a detailed
              explanation of why.

Note: an empty "TODO" line was added to announce-self to keep the
example from floating up into the body; this will be addressed more
rigorously in the new qapidoc generator.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20240717021312.606116-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Markup fixed in one place]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-07-17 10:20:53 +02:00

121 lines
2.9 KiB
Python

# -*- Mode: Python -*-
# vim: filetype=python
#
##
# = Record/replay
##
{ 'include': 'common.json' }
##
# @ReplayMode:
#
# Mode of the replay subsystem.
#
# @none: normal execution mode. Replay or record are not enabled.
#
# @record: record mode. All non-deterministic data is written into
# the replay log.
#
# @play: replay mode. Non-deterministic data required for system
# execution is read from the log.
#
# Since: 2.5
##
{ 'enum': 'ReplayMode',
'data': [ 'none', 'record', 'play' ] }
##
# @ReplayInfo:
#
# Record/replay information.
#
# @mode: current mode.
#
# @filename: name of the record/replay log file. It is present only
# in record or replay modes, when the log is recorded or replayed.
#
# @icount: current number of executed instructions.
#
# Since: 5.2
##
{ 'struct': 'ReplayInfo',
'data': { 'mode': 'ReplayMode', '*filename': 'str', 'icount': 'int' } }
##
# @query-replay:
#
# Retrieve the record/replay information. It includes current
# instruction count which may be used for @replay-break and
# @replay-seek commands.
#
# Returns: record/replay information.
#
# Since: 5.2
#
# .. qmp-example::
#
# -> { "execute": "query-replay" }
# <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
##
{ 'command': 'query-replay',
'returns': 'ReplayInfo' }
##
# @replay-break:
#
# Set replay breakpoint at instruction count @icount. Execution stops
# when the specified instruction is reached. There can be at most one
# breakpoint. When breakpoint is set, any prior one is removed. The
# breakpoint may be set only in replay mode and only "in the future",
# i.e. at instruction counts greater than the current one. The
# current instruction count can be observed with @query-replay.
#
# @icount: instruction count to stop at
#
# Since: 5.2
#
# .. qmp-example::
#
# -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
# <- { "return": {} }
##
{ 'command': 'replay-break', 'data': { 'icount': 'int' } }
##
# @replay-delete-break:
#
# Remove replay breakpoint which was set with @replay-break. The
# command is ignored when there are no replay breakpoints.
#
# Since: 5.2
#
# .. qmp-example::
#
# -> { "execute": "replay-delete-break" }
# <- { "return": {} }
##
{ 'command': 'replay-delete-break' }
##
# @replay-seek:
#
# Automatically proceed 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 fails. Instruction count can be obtained
# with the @query-replay command.
#
# @icount: target instruction count
#
# Since: 5.2
#
# .. qmp-example::
#
# -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
# <- { "return": {} }
##
{ 'command': 'replay-seek', 'data': { 'icount': 'int' } }