cmd/pprof: use DWARF info to lookup unknown PC addresses

Test to follow in a separate CL that arranges for the runtime package to
store non-Go addresses in a CPU profile.

Change-Id: I33ce1d66b77340b1e62b54505fc9b1abcec108a9
Reviewed-on: https://go-review.googlesource.com/21055
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-03-23 17:10:18 -07:00
parent 4b209dbf0b
commit b4117995e3
7 changed files with 123 additions and 7 deletions

View file

@ -8,6 +8,8 @@ package objfile
import (
"cmd/internal/goobj"
"debug/dwarf"
"errors"
"fmt"
"os"
)
@ -91,3 +93,7 @@ func (f *goobjFile) text() (textStart uint64, text []byte, err error) {
func (f *goobjFile) goarch() string {
return "GOARCH unimplemented for debug/goobj files"
}
func (f *goobjFile) dwarf() (*dwarf.Data, error) {
return nil, errors.New("no DWARF data in go object file")
}