aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/pprof
diff options
context:
space:
mode:
authorRaul Silvera <rsilvera@google.com>2016-12-21 10:16:15 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2016-12-22 22:43:44 +0000
commit8887be4654a49d8644d35661f2d71c970ba6dc02 (patch)
tree2f92c7b8bbe4902ad506f9bd9c52e8fc49870914 /src/cmd/pprof
parent6e36811c37399d60cbce587b7c48e611009c5aec (diff)
downloadgo-8887be4654a49d8644d35661f2d71c970ba6dc02.tar.gz
go-8887be4654a49d8644d35661f2d71c970ba6dc02.zip
cmd/pprof: Re-enable weblist and disasm
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>
Diffstat (limited to 'src/cmd/pprof')
-rw-r--r--src/cmd/pprof/internal/report/report.go2
-rw-r--r--src/cmd/pprof/internal/report/source.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/pprof/internal/report/report.go b/src/cmd/pprof/internal/report/report.go
index 14875c16db..f897c9086f 100644
--- a/src/cmd/pprof/internal/report/report.go
+++ b/src/cmd/pprof/internal/report/report.go
@@ -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
}
diff --git a/src/cmd/pprof/internal/report/source.go b/src/cmd/pprof/internal/report/source.go
index 7ab7e3861f..458985d1fa 100644
--- a/src/cmd/pprof/internal/report/source.go
+++ b/src/cmd/pprof/internal/report/source.go
@@ -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