gcc/libgo/runtime
Ian Lance Taylor 58f7dab40d runtime: copy mstats code from Go 1.7 runtime
This replaces mem.go and the C runtime_ReadMemStats function with the Go
    1.7 mstats.go.
    
    The GCStats code is commented out for now.  The corresponding gccgo code
    is in runtime/mgc0.c.
    
    The variables memstats and worldsema are shared between the Go code and
    the C code, but are not exported.  To make this work, add temporary
    accessor functions acquireWorldsema, releaseWorldsema, getMstats (the
    latter known as mstats in the C code).
    
    Check the preemptoff field of m when allocating and when considering
    whether to start a GC.  This works with the new stopTheWorld and
    startTheWorld functions in Go, which are essentially the Go 1.7
    versions.
    
    Change the compiler to stack allocate closures when compiling the
    runtime package.  Within the runtime packages closures do not escape.
    This is similar to what the gc compiler does, except that the gc
    compiler, when compiling the runtime package, gives an error if escape
    analysis shows that a closure does escape.  I added this here because
    the Go version of ReadMemStats calls systemstack with a closure, and
    having that allocate memory was causing some tests that measure memory
    allocations to fail.
    
    Reviewed-on: https://go-review.googlesource.com/30972

From-SVN: r241124
2016-10-13 15:24:50 +00:00
..
arch.h
array.h
cpuprof.goc runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
defs.h
env_posix.c runtime: copy runtime.go and runtime1.go from Go 1.7 2016-09-29 00:56:44 +00:00
getncpu-bsd.c
getncpu-irix.c
getncpu-linux.c
getncpu-none.c
getncpu-solaris.c
go-alloc.h
go-append.c
go-assert-interface.c
go-assert.c
go-assert.h
go-breakpoint.c
go-caller.c runtime: copy runtime.go and runtime1.go from Go 1.7 2016-09-29 00:56:44 +00:00
go-callers.c compiler, runtime: mark stub methods, ignore them in runtime.Caller. 2016-02-03 06:54:41 +00:00
go-can-convert-interface.c
go-cdiv.c
go-cgo.c runtime: copy channel code from Go 1.7 runtime 2016-10-10 16:52:09 +00:00
go-check-interface.c
go-construct-map.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-convert-interface.c
go-copy.c
go-defer.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-deferred-recover.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-eface-compare.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-eface-val-compare.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-ffi.c re PR go/72814 (reflect FAILs on 32-bit Solaris/SPARC: SIGILL) 2016-08-08 19:53:44 +00:00
go-ffi.h
go-fieldtrack.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-iface.goc
go-interface-compare.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-interface-eface-compare.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-interface-val-compare.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-libmain.c runtime: For c-archive/c-shared, install signal handlers synchronously. 2016-02-12 22:10:09 +00:00
go-main.c re PR go/69357 (libgo refers to _end in a non-weak way) 2016-02-09 00:34:55 +00:00
go-make-slice.c
go-matherr.c
go-memclr.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-memcmp.c
go-memequal.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-memmove.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-nanotime.c
go-new.c compiler,runtime: Determine if allocations need new pointers in runtime. 2015-07-14 01:22:25 +00:00
go-nosys.c libgo: change build procedure to use build tags 2016-08-06 00:36:33 +00:00
go-now.c re PR go/66574 (Time is provided in millisecond precision instead of nanoseconds as described in go documentation) 2015-11-21 01:27:44 +00:00
go-panic.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-panic.h runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-recover.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-reflect-call.c re PR go/68496 ([libgo] reflect test fails on Linux x86-64) 2015-11-23 21:17:45 +00:00
go-runtime-error.c
go-setenv.c
go-signal.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-strcmp.c
go-string.h
go-strslice.c
go-traceback.c
go-trampoline.c
go-type-complex.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type-eface.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type-float.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type-identity.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type-interface.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type-string.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-type.h compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
go-typedesc-equal.c re PR go/65755 (incorrect reflection of struct fields with gccgo) 2015-04-17 18:19:44 +00:00
go-unsafe-new.c
go-unsafe-newarray.c
go-unsafe-pointer.c compiler, reflect, runtime: remove zero field from type descriptor 2015-10-29 18:14:50 +00:00
go-unsetenv.c
go-unwind.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
go-varargs.c libgo: Solaris portability fixes. 2015-11-06 19:15:45 +00:00
goc2c.c
heapdump.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
interface.h
lfstack.goc runtime: Fix recent lfstack change on Solaris. 2015-09-24 13:33:20 +00:00
malloc.goc runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
malloc.h runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
mcache.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
mcentral.c compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
mem.c
mem_posix_memalign.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
mfixalloc.c
mgc0.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
mgc0.h
mheap.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
mprof.goc runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
msize.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
netpoll.goc runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
netpoll_epoll.c
netpoll_kqueue.c
netpoll_select.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
netpoll_stub.c
panic.c runtime: copy print/println support from Go 1.7 2016-10-10 23:13:39 +00:00
parfor.c runtime: Remove now unnecessary pad field from ParFor. 2015-10-31 00:59:47 +00:00
print.c runtime: copy print/println support from Go 1.7 2016-10-10 23:13:39 +00:00
proc.c runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
rdebug.goc
reflect.goc
rtems-task-variable-add.c
runtime.c runtime: copy internal locking code from Go 1.7 runtime 2016-09-30 13:45:08 +00:00
runtime.h runtime: copy mstats code from Go 1.7 runtime 2016-10-13 15:24:50 +00:00
runtime1.goc runtime: copy runtime.go and runtime1.go from Go 1.7 2016-09-29 00:56:44 +00:00
signal_unix.c runtime: use -fgo-c-header to build C header file 2016-08-30 21:07:47 +00:00
signal_unix.h
sigqueue.goc runtime: Remove now unnecessary pad field from ParFor. 2015-10-31 00:59:47 +00:00
thread-linux.c runtime: copy internal locking code from Go 1.7 runtime 2016-09-30 13:45:08 +00:00
thread-sema.c runtime: copy internal locking code from Go 1.7 runtime 2016-09-30 13:45:08 +00:00
thread.c
time.goc
yield.c