aboutsummaryrefslogtreecommitdiff
path: root/qapi/replay.json
blob: 351898f60df57c9d8f0f4f7fa08cc3a11b811985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# -*- 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
#
# 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
#
# Example:
#
# -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
#
##
{ '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
#
# Example:
#
# -> { "execute": "replay-delete-break" }
#
##
{ '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.
# icount for the reference may be obtained with @query-replay command.
#
# @icount: target instruction count
#
# Since: 5.2
#
# Example:
#
# -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
##
{ 'command': 'replay-seek', 'data': { 'icount': 'int' } }