Am 10.10.2018 um 15:34 hat Pavel Dovgalyuk geschrieben: > Saving icount as a parameters of the snapshot allows navigation between > them in the execution replay scenario. > This information can be used for finding a specific snapshot for rewinding > the recorded execution to the specific moment of the time. > E.g., 'reverse step' action needs to load the nearest snapshot which is > prior to the current moment of time . > > Signed-off-by: Pavel Dovgalyuk <pavel.dovga...@ispras.ru>
> diff --git a/block/qapi.c b/block/qapi.c > index c66f949..9f2ccfa 100644 > --- a/block/qapi.c > +++ b/block/qapi.c > @@ -210,6 +210,7 @@ int bdrv_query_snapshot_info_list(BlockDriverState *bs, > info->date_nsec = sn_tab[i].date_nsec; > info->vm_clock_sec = sn_tab[i].vm_clock_nsec / 1000000000; > info->vm_clock_nsec = sn_tab[i].vm_clock_nsec % 1000000000; > + info->icount = sn_tab[i].icount; Now that it's optional, info->has_icount needs to be set, too. > info_list = g_new0(SnapshotInfoList, 1); > info_list->value = info; > diff --git a/qapi/block-core.json b/qapi/block-core.json > index cfb37f8..34dc9f1 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -26,13 +26,18 @@ > # > # @vm-clock-nsec: fractional part in nano seconds to be used with > vm-clock-sec > # > +# @icount: Current instruction count. Appears when execution record/replay > +# is enabled. Used for "time-traveling" to match the moment > +# in the recorded execution with the snapshots (since 3.1) "(since 4.0)" now. Kevin