The author introduces a new 'rewind time' command in Rewind, a deterministic VM, inspired by Brendan Gregg's performance analysis techniques. This tool analyzes the critical path—the longest chain of dependent work in a program—to identify bottlenecks. Using a libuv build as an example, it shows a 78-second run with a 47.4-second critical path, revealing that 67% of the time is spent asleep (e.g., epoll_pwait, clock_nanosleep), which CPU profilers miss.
Rewind records every context switch and wakeup, enabling off-CPU analysis to pinpoint where threads block and what causes delays, making performance optimization more precise.
Source: Hacker News · Summarized by HeadlinesBriefing