]> Cypherpunks repositories - gostls13.git/commit
runtime: use manual stack for garbage collection
authorRuss Cox <rsc@golang.org>
Tue, 7 Sep 2010 13:57:22 +0000 (09:57 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 7 Sep 2010 13:57:22 +0000 (09:57 -0400)
commitd4cc557b0d61ac02d0ff153ecd643867e803ed1f
treec8301a638fd5010bb90b6a6d415ec371c74ba3ce
parent6f5f558c101a5948f1d90007fe93159804743bb6
runtime: use manual stack for garbage collection

Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.

in test/garbage:

Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%

R=r
CC=golang-dev
https://golang.org/cl/2150042
20 files changed:
src/pkg/runtime/darwin/386/sys.s
src/pkg/runtime/darwin/amd64/sys.s
src/pkg/runtime/darwin/mem.c
src/pkg/runtime/debug.go
src/pkg/runtime/freebsd/386/sys.s
src/pkg/runtime/freebsd/amd64/sys.s
src/pkg/runtime/freebsd/mem.c
src/pkg/runtime/linux/386/sys.s
src/pkg/runtime/linux/amd64/sys.s
src/pkg/runtime/linux/arm/sys.s
src/pkg/runtime/linux/mem.c
src/pkg/runtime/malloc.h
src/pkg/runtime/mcache.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c
src/pkg/runtime/nacl/386/sys.s
src/pkg/runtime/nacl/mem.c
src/pkg/runtime/runtime.h
src/pkg/runtime/tiny/mem.c
src/pkg/runtime/windows/mem.c