diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-14 22:51:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-14 22:51:46 +0000 |
commit | 1f0be9ee86f63bac9c4541a9cfaf52cb5ae5e89a (patch) | |
tree | 584ab0cd64a2743fa7198ca34c7b13282c1c0ad7 /libgo/go/runtime/runtime2.go | |
parent | 2045acd902fd8028514a72c58c98dba11749b8ad (diff) | |
download | gcc-1f0be9ee86f63bac9c4541a9cfaf52cb5ae5e89a.zip gcc-1f0be9ee86f63bac9c4541a9cfaf52cb5ae5e89a.tar.gz gcc-1f0be9ee86f63bac9c4541a9cfaf52cb5ae5e89a.tar.bz2 |
runtime: copy mprof code from Go 1.7 runtime
Also create a gccgo version of some of the traceback code in
traceback_gccgo.go, replacing some code currently in C.
This required modifying the compiler so that when compiling the runtime
package a slice expression does not cause a local array variable to
escape to the heap.
Reviewed-on: https://go-review.googlesource.com/31230
From-SVN: r241189
Diffstat (limited to 'libgo/go/runtime/runtime2.go')
-rw-r--r-- | libgo/go/runtime/runtime2.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/libgo/go/runtime/runtime2.go b/libgo/go/runtime/runtime2.go index 25b5b79..660d81e 100644 --- a/libgo/go/runtime/runtime2.go +++ b/libgo/go/runtime/runtime2.go @@ -394,7 +394,7 @@ type g struct { issystem bool // do not output in stack dump isbackground bool // ignore in deadlock detector - traceback *traceback // stack traceback buffer + traceback *tracebackg // stack traceback buffer context g_ucontext_t // saved context for setcontext stackcontext [10]unsafe.Pointer // split-stack context @@ -801,21 +801,6 @@ var ( // array. type g_ucontext_t [(_sizeof_ucontext_t + 15) / unsafe.Sizeof(unsafe.Pointer(nil))]unsafe.Pointer -// traceback is used to collect stack traces from other goroutines. -type traceback struct { - gp *g - locbuf [_TracebackMaxFrames]location - c int -} - -// location is a location in the program, used for backtraces. -type location struct { - pc uintptr - filename string - function string - lineno int -} - // cgoMal tracks allocations made by _cgo_allocate // FIXME: _cgo_allocate has been removed from gc and can probably be // removed from gccgo too. |