Inside the Go Runtime: How Profiling Captures Your Code in Motion

Understanding the Go Runtime: Profiling

Inside the Go Runtime: How Profiling Captures Your Code in Motion

I explore how the Go runtime captures your program in motion through five distinct profiling types, all sharing a unified pprof format. From CPU sampling via signals to heap and mutex tracking, I break down the collection models and the clever data structures that deduplicate call stacks to reveal exactly where your time is spent.

Profiling is the runtime catching your program in motion — sampling what it’s doing and where it’s spending its time.
  1. throwaw12

    Since this is shared by @valyala, I feel comfortable trusting the content, but is the original author of the blog delegating all writing to AI or are they genuinely this smart to produce high quality content this fast?

    For example see here their series about Filesystem internals: https://internals-for-interns.com/series/filesystems/

    Reason I am asking, should I add them to my personal "Human blogs to read list"

  2. 5701652400

    I have nothing against AI blogs. Ideally it saves cost, so my AI does not need to waste compute to generate all that. We all likely have same models (Fable vs Sonnet vs Deepseek tiers of course) which produce same result for same input. So just save yourself tokens.

    If it is human-reviewed AI blog, even better.

    And if my AI can collaborate and improve/build-up/fact-check that article, perhaps our AIs working in GitHub Issue on those (which is a missing link now). That would be even better.

More from this day

2026-07-14