• Raul Silvera's avatar
    cmd/pprof/internal: use and accept packed encoding for repeated fields · fcd2a06a
    Raul Silvera authored
    Packed encoding is the default on the proto3 format. Profiles generated
    in the profile.proto format by third parties cannot be decoded by the
    Go pprof tool, since its proto decoder does not recognize packed
    encoding for repeated fields.
    
    In particular this issue prevents go tool pprof from reading profiles
    generated by the version of pprof in github.com/google/pprof
    
    Profiles generated by go tool pprof after this change will use packed
    repeating fields, so older versions of pprof will not be able to read
    them. pprof will continue to be able to read profiles generated before
    this change.
    
    Change-Id: Ife0b353a535ae1e495515b9bcec588dd967e171b
    Reviewed-on: https://go-review.googlesource.com/21240Reviewed-by: default avatarDavid Symonds <dsymonds@golang.org>
    Run-TryBot: David Symonds <dsymonds@golang.org>
    fcd2a06a
proto.go 6.89 KB