2020-10-03 20:13:14 +03:00
|
|
|
# -*- Mode: Python -*-
|
2021-12-20 17:56:24 +03:00
|
|
|
# vim: filetype=python
|
2020-10-03 20:13:14 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
##
|
|
|
|
# = Record/replay
|
|
|
|
##
|
|
|
|
|
|
|
|
{ 'include': 'common.json' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @ReplayMode:
|
|
|
|
#
|
|
|
|
# Mode of the replay subsystem.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @none: normal execution mode. Replay or record are not enabled.
|
2020-10-03 20:13:14 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @record: record mode. All non-deterministic data is written into
|
|
|
|
# the replay log.
|
2020-10-03 20:13:14 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @play: replay mode. Non-deterministic data required for system
|
|
|
|
# execution is read from the log.
|
2020-10-03 20:13:14 +03:00
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'enum': 'ReplayMode',
|
|
|
|
'data': [ 'none', 'record', 'play' ] }
|
2020-10-03 20:13:20 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @ReplayInfo:
|
|
|
|
#
|
|
|
|
# Record/replay information.
|
|
|
|
#
|
|
|
|
# @mode: current mode.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @filename: name of the record/replay log file. It is present only
|
|
|
|
# in record or replay modes, when the log is recorded or replayed.
|
2020-10-03 20:13:20 +03:00
|
|
|
#
|
|
|
|
# @icount: current number of executed instructions.
|
|
|
|
#
|
|
|
|
# Since: 5.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'ReplayInfo',
|
|
|
|
'data': { 'mode': 'ReplayMode', '*filename': 'str', 'icount': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-replay:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Retrieve the record/replay information. It includes current
|
|
|
|
# instruction count which may be used for @replay-break and
|
|
|
|
# @replay-seek commands.
|
2020-10-03 20:13:20 +03:00
|
|
|
#
|
|
|
|
# Returns: record/replay information.
|
|
|
|
#
|
|
|
|
# Since: 5.2
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# -> { "execute": "query-replay" }
|
|
|
|
# <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
|
|
|
|
##
|
|
|
|
{ 'command': 'query-replay',
|
|
|
|
'returns': 'ReplayInfo' }
|
2020-10-03 20:13:26 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @replay-break:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# 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.
|
2020-10-03 20:13:26 +03:00
|
|
|
#
|
|
|
|
# @icount: instruction count to stop at
|
|
|
|
#
|
|
|
|
# Since: 5.2
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2022-03-31 22:06:26 +03:00
|
|
|
# -> { "execute": "replay-break", "arguments": { "icount": 220414 } }
|
2023-04-25 09:42:14 +03:00
|
|
|
# <- { "return": {} }
|
2020-10-03 20:13:26 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'replay-break', 'data': { 'icount': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @replay-delete-break:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Remove replay breakpoint which was set with @replay-break. The
|
|
|
|
# command is ignored when there are no replay breakpoints.
|
2020-10-03 20:13:26 +03:00
|
|
|
#
|
|
|
|
# Since: 5.2
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# -> { "execute": "replay-delete-break" }
|
2023-04-25 09:42:14 +03:00
|
|
|
# <- { "return": {} }
|
2020-10-03 20:13:26 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'replay-delete-break' }
|
2020-10-03 20:13:31 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @replay-seek:
|
|
|
|
#
|
|
|
|
# Automatically proceed to the instruction count @icount, when
|
2023-04-28 13:54:29 +03:00
|
|
|
# replaying the execution. The command automatically loads nearest
|
2020-10-03 20:13:31 +03:00
|
|
|
# snapshot and replays the execution to find the desired instruction.
|
2023-04-28 13:54:29 +03:00
|
|
|
# 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.
|
2020-10-03 20:13:31 +03:00
|
|
|
#
|
|
|
|
# @icount: target instruction count
|
|
|
|
#
|
|
|
|
# Since: 5.2
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2022-03-31 22:06:26 +03:00
|
|
|
# -> { "execute": "replay-seek", "arguments": { "icount": 220414 } }
|
2023-04-25 09:42:14 +03:00
|
|
|
# <- { "return": {} }
|
2020-10-03 20:13:31 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'replay-seek', 'data': { 'icount': 'int' } }
|