Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have dumb question

> You can rewind the full state of the program to any previous point in time

Where does all this saved state go? I'm running a game that runs at 60fps, every frame 10s of megs of data change. It won't take more than a few second to run out of memory to save all the state. Further, if the game doesn't run at 60fps (or 90fps on VR) it's not usable, if saving this state slows the game down to 20fps or 15fps I can't tell if my code is working since the entire goal is to run at speed and check it all feels good.

Is there some technique these kinds of tools use to make it possible to do keep all changed state in this type of app or do they only work for some other type of app?



By capturing all external inputs to application, it can replay it many times and results will be always identical.

https://arxiv.org/pdf/1705.05937


It's a good question. rr writes all the state to disk. Every syscall of any kind gets saved and replayed back the same way when you replay the recording. This means that if your program reads a network packet in the recording, during the replay it will read exactly the same network packet at exactly the same point in it's execution.

On the other hand, outputs are not really recorded. During the replay your program will generate exactly the same output, so saving it to disk isn't necessary.

See http://rr-project.org/ for all the details.

There's no such thing as a free lunch, so it'll certainly slow your game down a bit. I recommend saving the trace to the fastest disk you can find. Also, you would want to run your game during development both with and without rr, precisely so that you know that you're not exceeding your time budget.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: