]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: add heap lock assertions
authorMichael Pratt <mpratt@google.com>
Fri, 21 Aug 2020 15:59:55 +0000 (11:59 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 30 Oct 2020 20:21:14 +0000 (20:21 +0000)
commit9393b5bae5944acebed3ab6f995926b7de3ce429
treef2b29ca5cbc839f575cc0011b425a3231895016f
parent6abbfc17c255c07134a69c3ca305231db80530ec
runtime: add heap lock assertions

Some functions that required holding the heap lock _or_ world stop have
been simplified to simply requiring the heap lock. This is conceptually
simpler and taking the heap lock during world stop is guaranteed to not
contend. This was only done on functions already called on the
systemstack to avoid too many extra systemstack calls in GC.

Updates #40677

Change-Id: I15aa1dadcdd1a81aac3d2a9ecad6e7d0377befdc
Reviewed-on: https://go-review.googlesource.com/c/go/+/250262
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Trust: Michael Pratt <mpratt@google.com>
src/runtime/export_test.go
src/runtime/malloc.go
src/runtime/mgc.go
src/runtime/mgcscavenge.go
src/runtime/mheap.go
src/runtime/mpagealloc.go
src/runtime/mpagecache.go
src/runtime/proc.go