From 5012e806b5e50a463609643d5ab04f509e55c3be Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 14 Aug 2020 12:27:26 -0400 Subject: 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 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Dmitri Shuralyov --- src/cmd/vendor/github.com/google/pprof/profile/profile.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/cmd/vendor/github.com/google/pprof/profile') 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) } } } -- cgit v1.3