source `dirname $0`/util.sh

timeslice=1000
RECORD_ARGS="-c$timeslice"

record async_signal_syscalls$bitness 9

num_events=$(count_events)
# This recording has a large number of events, and it's impractical to
# run the debugger for each one.  The original bug reproduces when the
# debugger attaches to pretty much any event past event 350, so we
# somewhat arbitrarily choose a stride that reduces the number of
# debug sessions by about 10x.
stride=80
for i in $(seq 1 $stride $num_events); do
    echo Checkpointing at event $i ...
    debug restart_finish "-g $i"
    if [[ "$leave_data" == "y" ]]; then
        break
    fi
done
