# Rewind's new command finds where your build's time actually goes

Original title: Worshipping at the Altar of Brendan Gregg

> Hacker News story 50626413 · language: en · submitted 2026-11-24
> Web version: https://zeli.app/story/50626413
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 208 · by [kqr](<https://news.ycombinator.com/user?id=kqr>) · 💬 38
[original](<https://fzakaria.com/2026/11/12/worshipping-at-the-altar-of-brendan-gregg>) · [HN discussion](<https://news.ycombinator.com/item?id=50626413>)

## Summary

Rewind, a deterministic VM, adds a `rewind time` command that computes the critical path of a run and shows where the time went. Analyzing a libuv build, it reveals the 47-second path is 67% asleep — threads blocked in epoll_pwait and clock_nanosleep — invisible to CPU profilers. Because every wakeup is recorded, you can jump to any moment, inspect the stack, and open gdb at that exact step. The ideas draw heavily on Brendan Gregg's off-CPU analysis, flame graphs, and colony graphs.

## Key quote

> A profiler hands you a stack, sampled at some moment you can never go back to. Every frame in `rewind time` is a moment in a recording, and Rewind can replay the run to it.

## HN discussion (38 comments)

### [aidanhs](<https://news.ycombinator.com/item?id=50628206>)

> I really like the idea of a deterministic VM (I like Antithesis for a similar reason!), though I saw on another post that your VM is single threaded which I feel like must compromise a lot of performance analyses? E.g. when you have very high throughput multithreaded pipelines.
>
> Personally I've really cooled on flamegraphs for the purpose of doing multithreaded performance analysis - it's so hard to infer cross-thread dependencies. I'd encourage people interested in performance analysis to read https://thume.ca/2023/12/02/tracing-methods/ (and I'd love to hear if there's something more recent than end of 2023 that has an updated census of tools) which makes a decent case for perfetto, though in my own use-cases I've just ended up creating low latency language-specific trace output library that I can aggregate and load into jaeger-ui, as you can actually add metadata indicating spans you follow from etc.
>
> For the author: your product looks very cool, but I encourage you (or someone you pay!) to do an extensive proof reading pass to remove LLM-isms, reading stuff like "process, with what it started" as a column header of ps-like output is like nails on a chalkboard.

### [disperso](<https://news.ycombinator.com/item?id=50631074>)

> Seems very interesting. Is there some parallel to make with RR (record and replay) in terms of features, limitations, etc.?
>
> https://github.com/rr-debugger/rr

### [uvdn7](<https://news.ycombinator.com/item?id=50629263>)

> Does this type of analysis and deterministic VM help async workloads (e.g. c++ coroutine, fiber, future, etc.)? My understanding is that they don't. I would love to know how to find the critical path for async code. It feels very hard (maybe impossible) to do without changing the framework code (e.g. embedding something like a request context so we know a later task on thread A is actually a continuation for request R).

### [adsharma](<https://news.ycombinator.com/item?id=50630802>)

> Things like this could be done via sleep profiling or CPU stall profiling.
>
> But they involve a trade-off in the Linux kernel or spending more transistors in CPU design.

### [jiveturkey](<https://news.ycombinator.com/item?id=50633640>)

> sadly the answer to the investigation was just a footnote.
>
> \> 4 Turns out that the test sleeps on purpose: it is checking how far uv_hrtime moves across a sleep. There is nothing to optimize in this case.
>
> also, no explanation of why he didn't look into the epoll_wait(). i guess because this is a blocking call, not intentionally asleep, and also the intentional sleep is magnified 600 times? epoll_wait() shows up as consuming 3x of the wall time but in the shortening analysis the nanosleeps are shown to add up to more time asleep. i'm a little confused on that.
>
> good article, would have been great with more editing. and it would be great to also see an example where a problem is fixed.

---

## Cite

- Page: https://zeli.app/story/50626413
- Date: 2026-11-24
- Source: fzakaria.com (https://fzakaria.com/2026/11/12/worshipping-at-the-altar-of-brendan-gregg)
- Hacker News: https://news.ycombinator.com/item?id=50626413

## Other languages

- zh: https://zeli.app/zh/story/50626413 · markdown: https://zeli.app/zh/story/50626413.md
- ja: https://zeli.app/ja/story/50626413 · markdown: https://zeli.app/ja/story/50626413.md
- ko: https://zeli.app/ko/story/50626413 · markdown: https://zeli.app/ko/story/50626413.md
- de: https://zeli.app/de/story/50626413 · markdown: https://zeli.app/de/story/50626413.md
- es: https://zeli.app/es/story/50626413 · markdown: https://zeli.app/es/story/50626413.md
- ru: https://zeli.app/ru/story/50626413 · markdown: https://zeli.app/ru/story/50626413.md
