master
json 122 lines 2.9 KB
Raw
1 # -*- Mode: Python -*-
2 # vim: filetype=python
3 #
4
5 ##
6 # *************
7 # Record/replay
8 # *************
9 ##
10
11 { 'include': 'common.json' }
12
13 ##
14 # @ReplayMode:
15 #
16 # Mode of the replay subsystem.
17 #
18 # @none: normal execution mode. Replay or record are not enabled.
19 #
20 # @record: record mode. All non-deterministic data is written into
21 # the replay log.
22 #
23 # @play: replay mode. Non-deterministic data required for system
24 # execution is read from the log.
25 #
26 # Since: 2.5
27 ##
28 { 'enum': 'ReplayMode',
29 'data': [ 'none', 'record', 'play' ] }
30
31 ##
32 # @ReplayInfo:
33 #
34 # Record/replay information.
35 #
36 # @mode: current mode.
37 #
38 # @filename: name of the record/replay log file. It is present only
39 # in record or replay modes, when the log is recorded or replayed.
40 #
41 # @icount: current number of executed instructions.
42 #
43 # Since: 5.2
44 ##
45 { 'struct': 'ReplayInfo',
46 'data': { 'mode': 'ReplayMode', '*filename': 'str', 'icount': 'int' } }
47
48 ##
49 # @query-replay:
50 #
51 # Retrieve the record/replay information. It includes current
52 # instruction count which may be used for `replay-break` and
53 # `replay-seek` commands.
54 #
55 # Returns: record/replay information.
56 #
57 # Since: 5.2
58 #
59 # .. qmp-example::
60 #
61 # -> { "execute": "query-replay" }
62 # <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
63 ##
64 { 'command': 'query-replay',
65 'returns': 'ReplayInfo' }
66
67 ##
68 # @replay-break:
69 #
70 # Set replay breakpoint at instruction count @icount. Execution stops
71 # when the specified instruction is reached. There can be at most one
72 # breakpoint. When breakpoint is set, any prior one is removed. The
73 # breakpoint may be set only in replay mode and only "in the future",
74 # i.e. at instruction counts greater than the current one. The
75 # current instruction count can be observed with `query-replay`.
76 #
77 # @icount: instruction count to stop at
78 #
79 # Since: 5.2
80 #
81 # .. qmp-example::
82 #
83 # -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
84 # <- { "return": {} }
85 ##
86 { 'command': 'replay-break', 'data': { 'icount': 'int' } }
87
88 ##
89 # @replay-delete-break:
90 #
91 # Remove replay breakpoint which was set with `replay-break`. The
92 # command is ignored when there are no replay breakpoints.
93 #
94 # Since: 5.2
95 #
96 # .. qmp-example::
97 #
98 # -> { "execute": "replay-delete-break" }
99 # <- { "return": {} }
100 ##
101 { 'command': 'replay-delete-break' }
102
103 ##
104 # @replay-seek:
105 #
106 # Automatically proceed to the instruction count @icount, when
107 # replaying the execution. The command automatically loads nearest
108 # snapshot and replays the execution to find the desired instruction.
109 # When there is no preceding snapshot or the execution is not
110 # replayed, then the command fails. Instruction count can be obtained
111 # with the `query-replay` command.
112 #
113 # @icount: target instruction count
114 #
115 # Since: 5.2
116 #
117 # .. qmp-example::
118 #
119 # -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
120 # <- { "return": {} }
121 ##
122 { 'command': 'replay-seek', 'data': { 'icount': 'int' } }