diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-05-27 16:03:44 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-05-31 13:02:09 +0000 |
commit | 4223294eab3dee0f6c03fd57fc24be3dc3e2d53a (patch) | |
tree | 70f810ef844aee4ef2a974661de8f6fb347b97df /src/cmd/internal/objfile/plan9obj.go | |
parent | 87ee12cece96ec5837fe89c37899d725e7e852d9 (diff) | |
download | go-git-4223294eab3dee0f6c03fd57fc24be3dc3e2d53a.tar.gz |
runtime/pprof, cmd/pprof: fix profiling for PIE
In order to support pprof for position independent executables, pprof
needs to adjust the PC addresses stored in the profile by the address at
which the program is loaded. The legacy profiling support which we use
already supports recording the GNU/Linux /proc/self/maps data
immediately after the CPU samples, so do that. Also change the pprof
symbolizer to use the information, if available, when looking up
addresses in the Go pcline data.
Fixes #15714.
Change-Id: I4bf679210ef7c51d85cf873c968ce82db8898e3e
Reviewed-on: https://go-review.googlesource.com/23525
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Diffstat (limited to 'src/cmd/internal/objfile/plan9obj.go')
-rw-r--r-- | src/cmd/internal/objfile/plan9obj.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/internal/objfile/plan9obj.go b/src/cmd/internal/objfile/plan9obj.go index 6ee389dc2e..3e34f65ae7 100644 --- a/src/cmd/internal/objfile/plan9obj.go +++ b/src/cmd/internal/objfile/plan9obj.go @@ -147,6 +147,10 @@ func (f *plan9File) goarch() string { return "" } +func (f *plan9File) loadAddress() (uint64, error) { + return 0, fmt.Errorf("unknown load address") +} + func (f *plan9File) dwarf() (*dwarf.Data, error) { return nil, errors.New("no DWARF data in Plan 9 file") } |