diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-14 14:59:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-14 14:59:42 +0000 |
commit | 1ac09ef2c611d3113665ec8c74e38b125217edb3 (patch) | |
tree | 0bed1e11d205c99ef1f13dd4b7aece761779c360 /libgo/go/runtime/panic.go | |
parent | ce9f305e44ff0353ee9e6cb07599240354ae9ed2 (diff) | |
download | gcc-1ac09ef2c611d3113665ec8c74e38b125217edb3.zip gcc-1ac09ef2c611d3113665ec8c74e38b125217edb3.tar.gz gcc-1ac09ef2c611d3113665ec8c74e38b125217edb3.tar.bz2 |
libgo: reduce overhead for memory/block/mutex profiling
Revise the gccgo version of memory/block/mutex profiling to reduce
runtime overhead. The main change is to collect raw stack traces while
the profile is on line, then post-process the stacks just prior to the
point where we are ready to use the final product. Memory profiling
(at a very low sampling rate) is enabled by default, and the overhead
of the symbolization / DWARF-reading from backtrace_full was slowing
things down relative to the main Go runtime.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/171497
From-SVN: r271172
Diffstat (limited to 'libgo/go/runtime/panic.go')
-rw-r--r-- | libgo/go/runtime/panic.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/runtime/panic.go b/libgo/go/runtime/panic.go index 9b8ffb9..264ad38 100644 --- a/libgo/go/runtime/panic.go +++ b/libgo/go/runtime/panic.go @@ -53,7 +53,7 @@ var indexError = error(errorString("index out of range")) // entire runtime stack for easier debugging. func panicindex() { - name, _, _ := funcfileline(getcallerpc()-1, -1) + name, _, _, _ := funcfileline(getcallerpc()-1, -1) if hasPrefix(name, "runtime.") { throw(string(indexError.(errorString))) } @@ -64,7 +64,7 @@ func panicindex() { var sliceError = error(errorString("slice bounds out of range")) func panicslice() { - name, _, _ := funcfileline(getcallerpc()-1, -1) + name, _, _, _ := funcfileline(getcallerpc()-1, -1) if hasPrefix(name, "runtime.") { throw(string(sliceError.(errorString))) } |