]> Cypherpunks repositories - gostls13.git/commit
cmd/pprof/internal: use and accept packed encoding for repeated fields
authorRaul Silvera <rsilvera@google.com>
Mon, 28 Mar 2016 20:52:28 +0000 (13:52 -0700)
committerDavid Symonds <dsymonds@golang.org>
Mon, 28 Mar 2016 22:55:20 +0000 (22:55 +0000)
commitfcd2a06ab61e910ef78875a15c01fe140cf853ce
treec5ba9a6f30a65eba52b85f971902e1156f631502
parent621aa713d46c3eebbc03e352436d109f28779e47
cmd/pprof/internal: use and accept packed encoding for repeated fields

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/21240
Reviewed-by: David Symonds <dsymonds@golang.org>
Run-TryBot: David Symonds <dsymonds@golang.org>
src/cmd/pprof/internal/profile/proto.go
src/cmd/pprof/internal/profile/proto_test.go [new file with mode: 0644]