Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / qapi / replay.json
blobd3559f9c8f7a6e15ad2a7bd71938eabde1658833
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Record/replay
7 ##
9 { 'include': 'common.json' }
12 # @ReplayMode:
14 # Mode of the replay subsystem.
16 # @none: normal execution mode.  Replay or record are not enabled.
18 # @record: record mode.  All non-deterministic data is written into
19 #     the replay log.
21 # @play: replay mode.  Non-deterministic data required for system
22 #     execution is read from the log.
24 # Since: 2.5
26 { 'enum': 'ReplayMode',
27   'data': [ 'none', 'record', 'play' ] }
30 # @ReplayInfo:
32 # Record/replay information.
34 # @mode: current mode.
36 # @filename: name of the record/replay log file.  It is present only
37 #     in record or replay modes, when the log is recorded or replayed.
39 # @icount: current number of executed instructions.
41 # Since: 5.2
43 { 'struct': 'ReplayInfo',
44   'data': { 'mode': 'ReplayMode', '*filename': 'str', 'icount': 'int' } }
47 # @query-replay:
49 # Retrieve the record/replay information.  It includes current
50 # instruction count which may be used for @replay-break and
51 # @replay-seek commands.
53 # Returns: record/replay information.
55 # Since: 5.2
57 # Example:
59 #     -> { "execute": "query-replay" }
60 #     <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
62 { 'command': 'query-replay',
63   'returns': 'ReplayInfo' }
66 # @replay-break:
68 # Set replay breakpoint at instruction count @icount.  Execution stops
69 # when the specified instruction is reached.  There can be at most one
70 # breakpoint.  When breakpoint is set, any prior one is removed.  The
71 # breakpoint may be set only in replay mode and only "in the future",
72 # i.e. at instruction counts greater than the current one.  The
73 # current instruction count can be observed with @query-replay.
75 # @icount: instruction count to stop at
77 # Since: 5.2
79 # Example:
81 #     -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
82 #     <- { "return": {} }
84 { 'command': 'replay-break', 'data': { 'icount': 'int' } }
87 # @replay-delete-break:
89 # Remove replay breakpoint which was set with @replay-break.  The
90 # command is ignored when there are no replay breakpoints.
92 # Since: 5.2
94 # Example:
96 #     -> { "execute": "replay-delete-break" }
97 #     <- { "return": {} }
99 { 'command': 'replay-delete-break' }
102 # @replay-seek:
104 # Automatically proceed to the instruction count @icount, when
105 # replaying the execution.  The command automatically loads nearest
106 # snapshot and replays the execution to find the desired instruction.
107 # When there is no preceding snapshot or the execution is not
108 # replayed, then the command fails.  Instruction count can be obtained
109 # with the @query-replay command.
111 # @icount: target instruction count
113 # Since: 5.2
115 # Example:
117 #     -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
118 #     <- { "return": {} }
120 { 'command': 'replay-seek', 'data': { 'icount': 'int' } }