diff options
| author | Hana (Hyang-Ah) Kim <hyangah@gmail.com> | 2020-08-14 12:27:26 -0400 |
|---|---|---|
| committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | 2020-10-07 21:18:29 +0000 |
| commit | 5012e806b5e50a463609643d5ab04f509e55c3be (patch) | |
| tree | a47320441038f6e0709739958bd966075228bade /src/cmd/vendor/github.com/google/pprof/profile | |
| parent | 3f7b4d12075277f28427e6b57708258225841ecd (diff) | |
| download | go-5012e806b5e50a463609643d5ab04f509e55c3be.tar.xz | |
cmd/vendor,cmd/pprof: sync pprof@1a94d8640e99
Updated cmd/pprof.objTool.Disasm to accept
an additional bool param introduced in
https://github.com/google/pprof/pull/520 to support
intel syntax in the assembly report.
Returns an error if the intelSyntax param is set. We use
src/cmd/internal/objfile to disassemble and print assembly
so I am not sure if it is relevant, and if so, how.
Fixes #38802
Updates #36905
Change-Id: Iae2b4322404f232196705f05210f00e2495588d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/248499
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/profile')
| -rw-r--r-- | src/cmd/vendor/github.com/google/pprof/profile/profile.go | 10 |
1 files changed, 6 insertions, 4 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 c950d8dc7f..d94d8b3d1c 100644 --- a/src/cmd/vendor/github.com/google/pprof/profile/profile.go +++ b/src/cmd/vendor/github.com/google/pprof/profile/profile.go @@ -398,10 +398,12 @@ func (p *Profile) CheckValid() error { } } for _, ln := range l.Line { - if f := ln.Function; f != nil { - if f.ID == 0 || functions[f.ID] != f { - return fmt.Errorf("inconsistent function %p: %d", f, f.ID) - } + f := ln.Function + if f == nil { + return fmt.Errorf("location id: %d has a line with nil function", l.ID) + } + if f.ID == 0 || functions[f.ID] != f { + return fmt.Errorf("inconsistent function %p: %d", f, f.ID) } } } |
