Restore code to optionally checkpoint/dump memory during recording.