Understanding the Go Runtime: Profiling

In the previous article
we took apart the reflect package and found that its magic is mostly the compiler leaving very good notes — type descriptors frozen into read-only data at build time, and a package that knows how to walk them. The whole article was about reading metadata that was already sitting in memory before main even started.
Today we shift the perspective. Profiling is the runtime catching your program in motion — sampling what it's doing and where it's spending its time, then accumulating that into something you can open with go tool pprof. The heart of every sample is a call stack, produced with the same unwinder we saw in the Stacktraces article
. So profiling is really live moment-catching sitting on top of build-time stack-reading.
12 points by valyala 106 days ago internals-for-interns.com 6 comments
Summary not yet generated for this article.

Comments (6 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open