• Hana Kim's avatar
    runtime/pprof: fix incorrect assumption in TestMapping · 88b442f5
    Hana Kim authored
    TestMapping assumed that there was only one mapping entry corresponding
    to /exe/main, but that is not always true.
    This CL changes the test logic to examine whether all referenced mappings
    are symbolized. Based on the result, the test determines whether the
    corresponding mapping entries' HasFunctions fields to be true or false.
    
    I initially attempted to create two mappings for referenced locations
    (one for symbolized and another for unsymbolized) as described in the
    TODO in proto.go as part of fixing this bug. But that change requires
    non-trivial modification in the upstream profile package so I decided
    to just fix the test for now.
    
    Fixes #25891
    
    Change-Id: Id27a5b07bb5b59e133755a0f863bf56c0a4f7f2b
    Reviewed-on: https://go-review.googlesource.com/119455
    Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    88b442f5
Name
Last commit
Last update
..
internal/profile Loading commit data...
testdata Loading commit data...
elf.go Loading commit data...
label.go Loading commit data...
label_test.go Loading commit data...
map.go Loading commit data...
mprof_test.go Loading commit data...
pprof.go Loading commit data...
pprof_test.go Loading commit data...
proto.go Loading commit data...
proto_test.go Loading commit data...
protobuf.go Loading commit data...
protomem.go Loading commit data...
protomem_test.go Loading commit data...
runtime.go Loading commit data...
runtime_test.go Loading commit data...