• Michael Matloob's avatar
    runtime/pprof: output CPU profiles in pprof protobuf format · 76f12cda
    Michael Matloob authored
    This change buffers the entire profile and converts in one shot
    in the profile writer, and could use more memory than necessary
    to output protocol buffer formatted profiles. It should be
    possible to convert each chunk in a stream (maybe maintaining
    some minimal state to output in the end) which could save on
    memory usage.
    
    Fixes #16093
    
    Change-Id: I946c6a2b044ae644c72c8bb2d3bd82c415b1a847
    Reviewed-on: https://go-review.googlesource.com/33071
    Run-TryBot: Michael Matloob <matloob@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    76f12cda
pprof.go 23.1 KB