I have written a blog post on describing how the Go CPU Profiler works internally in the Go runtime. What kind of data structures used, the overhead, the performance optimizations implemented...
Profiling of coroutines in Python have been problematic in nearly all profilers of Python. Yappi takes a different approach to address those issues and show profiling results of coroutines just as they are regular function calls. You can see details here: https://github.com/sumerc/yappi/blob/master/doc/coroutine-pr...