]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.4] cmd/pprof: fix symbol resolution for remote profiles
authorRuss Cox <rsc@golang.org>
Wed, 3 Dec 2014 19:14:50 +0000 (14:14 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 3 Dec 2014 19:14:50 +0000 (14:14 -0500)
««« CL 183080043 / b663cc7e6c15
cmd/pprof: fix symbol resolution for remote profiles

Fixes #9199.

LGTM=iant
R=golang-codereviews, iant
CC=austin, golang-codereviews, minux
https://golang.org/cl/183080043
»»»

TBR=iant
CC=golang-codereviews
https://golang.org/cl/176680043

src/cmd/pprof/internal/symbolizer/symbolizer.go

index cabddaa76e50daa8bec2e0f77cb632eb3f30b304..86de5640d29ca920cae1d9c91c6b9593f48bf431 100644 (file)
@@ -32,6 +32,10 @@ func Symbolize(mode string, prof *profile.Profile, obj plugin.ObjTool, ui plugin
                }
        }
 
+       if len(prof.Mapping) == 0 {
+               return fmt.Errorf("no known mappings")
+       }
+
        mt, err := newMapping(prof, obj, ui, force)
        if err != nil {
                return err