1. A method for recording execution of an application running on a computer system using a program module, the method comprising: detecting a non-deterministic event associated with a process of the application; deferring recordation of the non-deterministic event until the process enters a kernel mode, wherein the process enters the kernel mode at an occurrence of a deterministic event; when the process enters the kernel mode, recording the non-deterministic event; and saving the recorded event for deterministic replay.