Question on ReplayTimeline::reverse_singlestep()
sid.kshatriya at gmail.com
Fri May 11 08:45:05 UTC 2018
I am trying to understand the operation of the function
ReplayTimeline::reverse_singlestep(). Its a complex function and a critical
The greatest point of my confusion is the way the initial part of the
function (ReplayTimeline.cc:1091 -- while(true) ) rr is constantly trying
to approach the ticks_target. First it tries to do RUN_CONTINUE towards it,
and then when it approaches the skid region it starts doing
RUN_SINGLESTEP_FAST_FORWARD. That makes sense.
However, what is surprising to me is that rr is constantly trying to reach
the ticks_target but never taking trace time into account. Doesn't the
ticks target (RCB counter) constantly get set to zero regularly during
recording? My point is: the ticks_target could have wrapped to zero
multiple times. How can we just worry about ticks_target when there could
be multiple ticks_targets (of the same value) that could be relevant to us.
My surmise is that this wraparound is taken care of by the outer
while(true) loop in line 1086. Am I correct? So, if the ticks target is
3012, once replay has started from a point (current_key on line 1099), you
will keep trying to reach 3012 (or just greater than 3012) again and again
as any of them may be correct.
(My line numbers are with references to revision 5dc10d6e11e5)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rr-dev