aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/profile/profile.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-02-12 16:34:48 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-02-15 16:25:43 +0000
commite7cbbbe9bb878b6ca4ce04fde645df1c8f1845bd (patch)
treef84255198234eb4870c48228cdb4828de1f4f8c5 /src/cmd/vendor/github.com/google/pprof/profile/profile.go
parentafb9fc1de922a4ead9d2d787613255a7ba3490f7 (diff)
downloadgo-e7cbbbe9bb878b6ca4ce04fde645df1c8f1845bd.tar.xz
cmd/vendor/github.com/google/pprof: refresh from upstream
Updating to commit 0e0e5b7254e076a62326ab7305ba49e8515f0c91 from github.com/google/pprof Recent modifications to the vendored pprof, such as skipping TestWebInterface to avoid starting a web browser, have all been fixed upstream. Change-Id: I72e11108c438e1573bf2f9216e76d157378e8d45 Reviewed-on: https://go-review.googlesource.com/93375 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/profile/profile.go')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/profile/profile.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/profile/profile.go b/src/cmd/vendor/github.com/google/pprof/profile/profile.go
index a0f53efe3e..350538bf43 100644
--- a/src/cmd/vendor/github.com/google/pprof/profile/profile.go
+++ b/src/cmd/vendor/github.com/google/pprof/profile/profile.go
@@ -109,10 +109,11 @@ type Mapping struct {
// Location corresponds to Profile.Location
type Location struct {
- ID uint64
- Mapping *Mapping
- Address uint64
- Line []Line
+ ID uint64
+ Mapping *Mapping
+ Address uint64
+ Line []Line
+ IsFolded bool
mappingIDX uint64
}
@@ -163,7 +164,7 @@ func ParseData(data []byte) (*Profile, error) {
return nil, fmt.Errorf("decompressing profile: %v", err)
}
}
- if p, err = ParseUncompressed(data); err != nil && err != errNoData {
+ if p, err = ParseUncompressed(data); err != nil && err != errNoData && err != errConcatProfile {
p, err = parseLegacy(data)
}
@@ -180,6 +181,7 @@ func ParseData(data []byte) (*Profile, error) {
var errUnrecognized = fmt.Errorf("unrecognized profile format")
var errMalformed = fmt.Errorf("malformed profile format")
var errNoData = fmt.Errorf("empty input file")
+var errConcatProfile = fmt.Errorf("concatenated profiles detected")
func parseLegacy(data []byte) (*Profile, error) {
parsers := []func([]byte) (*Profile, error){
@@ -591,6 +593,9 @@ func (l *Location) string() string {
if m := l.Mapping; m != nil {
locStr = locStr + fmt.Sprintf("M=%d ", m.ID)
}
+ if l.IsFolded {
+ locStr = locStr + "[F] "
+ }
if len(l.Line) == 0 {
ss = append(ss, locStr)
}