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>
// 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
}
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