Skip to content

Commit 8887be4

Browse files
rauls5382bradfitz
authored andcommitted
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 6e36811 commit 8887be4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func symbolsFromBinaries(prof *profile.Profile, g graph, rx *regexp.Regexp, addr
123123
// Walk all mappings looking for matching functions with samples.
124124
var objSyms []*objSymbol
125125
for _, m := range prof.Mapping {
126-
if !hasSamples[filepath.Base(m.File)] {
126+
if !hasSamples[m.File] {
127127
if address == nil || !(m.Start <= *address && *address <= m.Limit) {
128128
continue
129129
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func assemblyPerSourceLine(objSyms []*objSymbol, rs nodes, src string, obj plugi
229229
func findMatchingSymbol(objSyms []*objSymbol, ns nodes) *objSymbol {
230230
for _, n := range ns {
231231
for _, o := range objSyms {
232-
if filepath.Base(o.sym.File) == n.info.objfile &&
232+
if o.sym.File == n.info.objfile &&
233233
o.sym.Start <= n.info.address-o.base &&
234234
n.info.address-o.base <= o.sym.End {
235235
return o

0 commit comments

Comments
 (0)