]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: Re-enable weblist and disasm
authorRaul Silvera <rsilvera@google.com>
Wed, 21 Dec 2016 18:16:15 +0000 (10:16 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 22 Dec 2016 22:43:44 +0000 (22:43 +0000)
Previous changes started using the full filename for object files
on graph nodes, instead of just the file basename. The basename
was still being used when selecting mappings to disassemble for
weblist and disasm commands, causing a mismatch.

This fixes #18385. It was already fixed on the upstream pprof.

Change-Id: I1664503634f2c8cd31743561301631f12c4949c9
Reviewed-on: https://go-review.googlesource.com/34665
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/pprof/internal/report/report.go
src/cmd/pprof/internal/report/source.go

index 14875c16dbb3f4b6a77bab04a983ad4c57fdfead..f897c9086f706aaa5b897e077467ea3fda0f3399 100644 (file)
@@ -123,7 +123,7 @@ func symbolsFromBinaries(prof *profile.Profile, g graph, rx *regexp.Regexp, addr
        // Walk all mappings looking for matching functions with samples.
        var objSyms []*objSymbol
        for _, m := range prof.Mapping {
-               if !hasSamples[filepath.Base(m.File)] {
+               if !hasSamples[m.File] {
                        if address == nil || !(m.Start <= *address && *address <= m.Limit) {
                                continue
                        }
index 7ab7e3861f79a7f88c18f8e3963cb1e11f0d77e0..458985d1fa012abeae8aa5a4a51dd99c038fd90c 100644 (file)
@@ -229,7 +229,7 @@ func assemblyPerSourceLine(objSyms []*objSymbol, rs nodes, src string, obj plugi
 func findMatchingSymbol(objSyms []*objSymbol, ns nodes) *objSymbol {
        for _, n := range ns {
                for _, o := range objSyms {
-                       if filepath.Base(o.sym.File) == n.info.objfile &&
+                       if o.sym.File == n.info.objfile &&
                                o.sym.Start <= n.info.address-o.base &&
                                n.info.address-o.base <= o.sym.End {
                                return o