A method of generating program analysis data for analyzing operation of a computer program includes running a first instrumented version of machine code representing the program, the running defines a reference execution of the program, and capturing a log of non-deterministic events during the reference execution such that the machine code can be re-run in a deterministic manner to reproduce states of a processor and memory during the re-running. The method also includes generating a second instrumented version of the machine code including instrumented machine code to replay execution of the machine code representing the program and to capture and store program state information during the replayed execution, the program state information includes one or both of one or more values of registers of the processor and one or more values of memory locations used by the program.