diff options
| author | Rick Hudson <rlh@golang.org> | 2015-02-05 19:58:18 -0500 |
|---|---|---|
| committer | Rick Hudson <rlh@golang.org> | 2015-02-11 16:27:17 +0000 |
| commit | a15818fed3032d43e57c395c3fe8b46b37a5f1ea (patch) | |
| tree | 9eb8f7acbbc48a572184a3d7b83cdd55e2eef047 /src/runtime/malloc.go | |
| parent | 59495e8dfda0cfc1fa527337b2fed8a8099137dc (diff) | |
| download | go-a15818fed3032d43e57c395c3fe8b46b37a5f1ea.tar.xz | |
runtime: cache workbufs on Ms and add consistency checks
Add local workbufs to the m struct in order to reduce contention.
Add consistency checks for workbuf ownership.
Chain workbufs through call change to avoid swapping them
to and from the m struct.
Adjust the size of the workbuf so that the mutators can
more frequently pass modifications to the GC thus shifting
some work from the STW mark termination phase to the concurrent
mark phase.
Change-Id: I557b53af34ad9972265e0ed9f5996e52d548563d
Reviewed-on: https://go-review.googlesource.com/3972
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index b8b1f4ed36..06ba124473 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -312,6 +312,7 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) { // For now this must be bracketed with a stoptheworld and a starttheworld to ensure // all go routines see the new barrier. +//go:nowritebarrier func gcinstallmarkwb() { gcphase = _GCmark } @@ -389,6 +390,7 @@ func gcwork(force int32) { gctimer.cycle.installmarkwb = nanotime() systemstack(stoptheworld) systemstack(gcinstallmarkwb) + systemstack(harvestwbufs) systemstack(starttheworld) gctimer.cycle.mark = nanotime() systemstack(gcmark_m) |
