aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_linux.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-11-17 14:44:41 -0500
committerAustin Clements <austin@google.com>2014-11-17 14:44:41 -0500
commit38fef031e16f819a3f1f6e14e3e7d70ac4ccfebb (patch)
tree3579bfe9559f64c70c67ccefe92a4723cf9fa2d6 /src/syscall/exec_linux.go
parentb30d2a856ad7805a35b1642a553effef545c8879 (diff)
downloadgo-38fef031e16f819a3f1f6e14e3e7d70ac4ccfebb.tar.xz
cmd/pprof: fix EOF handling when getting function source
getFunctionSource gathers five lines of "margin" around every requested sample line. However, if this margin went past the end of the source file, getFunctionSource would encounter an io.EOF error and abort with this error, resulting in listings like (pprof) list main.main ROUTINE ======================== main.main in ... 0 8.33s (flat, cum) 99.17% of Total Error: EOF (pprof) Modify the error handling in getFunctionSource so io.EOF is always considered non-fatal. If it reaches EOF, it simply returns the lines it has. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/172600043
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions