The actual profile data is collected by the code in runtime/cpuprof.go
and runtime/profBuf.go. That data is generated 100 times per second.
The code you are looking at in the runtime/pprof package is the code
that is collecting that data, which is generated at interrupt time,
and converting it into a format that can be reported to the user or
the pprof program.
Ian