mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: simpler and faster GC
Implement the design described in: https://docs.google.com/document/d/1v4Oqa0WwHunqlb8C3ObL_uNQw3DfSY-ztoA-4wWbKcg/pub Summary of the changes: GC uses "2-bits per word" pointer type info embed directly into bitmap. Scanning of stacks/data/heap is unified. The old spans types go away. Compiler generates "sparse" 4-bits type info for GC (directly for GC bitmap). Linker generates "dense" 2-bits type info for data/bss (the same as stacks use). Summary of results: -1680 lines of code total (-1000+ in mgc0.c only) -25% memory consumption -3-7% binary size -15% GC pause reduction -7% run time reduction LGTM=khr R=golang-codereviews, rsc, christoph, khr CC=golang-codereviews, rlh https://golang.org/cl/106260045
This commit is contained in:
parent
0100afbdcc
commit
cd17a717f9
27 changed files with 1632 additions and 2413 deletions
|
|
@ -62,6 +62,9 @@ func ParForIters(desc *ParFor, tid uint32) (uint32, uint32) {
|
|||
return uint32(begin), uint32(end)
|
||||
}
|
||||
|
||||
//go:noescape
|
||||
func GCMask(x interface{}) []byte
|
||||
|
||||
func testSchedLocalQueue()
|
||||
func testSchedLocalQueueSteal()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue