Enabling Program Analysis Through Deterministic Replay And Optimistic Hybrid Analysis