diff options
| author | Mauri de Souza Meneguzzo <mauri870@gmail.com> | 2023-11-04 23:05:05 +0000 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2023-11-07 17:21:04 +0000 |
| commit | 72da49caee3319dcdc5f03a8f70352eb4b725a64 (patch) | |
| tree | a057cbca29f9b991dae7558520f2b3a1086501bf /src/runtime/mbitmap.go | |
| parent | 43a27a7e8cbde4270e3f2b4e6e1538b28882c2d0 (diff) | |
| download | go-72da49caee3319dcdc5f03a8f70352eb4b725a64.tar.xz | |
cmd/compile,runtime: dedup writeBarrier needed
The writeBarrier "needed" struct member has the exact same
value as "enabled", and used interchangeably.
I'm not sure if we plan to make a distinction between the
two at some point, but today they are effectively the same,
so dedup it and keep only "enabled".
Change-Id: I65e596f174e1e820dc471a45ff70c0ef4efbc386
GitHub-Last-Rev: f8c805a91606d42c8d5b178ddd7d0bec7aaf9f55
GitHub-Pull-Request: golang/go#63814
Reviewed-on: https://go-review.googlesource.com/c/go/+/538495
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/mbitmap.go')
| -rw-r--r-- | src/runtime/mbitmap.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index bae90c665a..2bcf454797 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -563,7 +563,7 @@ func bulkBarrierPreWrite(dst, src, size uintptr) { if (dst|src|size)&(goarch.PtrSize-1) != 0 { throw("bulkBarrierPreWrite: unaligned arguments") } - if !writeBarrier.needed { + if !writeBarrier.enabled { return } if s := spanOf(dst); s == nil { @@ -633,7 +633,7 @@ func bulkBarrierPreWriteSrcOnly(dst, src, size uintptr) { if (dst|src|size)&(goarch.PtrSize-1) != 0 { throw("bulkBarrierPreWrite: unaligned arguments") } - if !writeBarrier.needed { + if !writeBarrier.enabled { return } buf := &getg().m.p.ptr().wbBuf @@ -718,7 +718,7 @@ func typeBitsBulkBarrier(typ *_type, dst, src, size uintptr) { println("runtime: typeBitsBulkBarrier with type ", toRType(typ).string(), " with GC prog") throw("runtime: invalid typeBitsBulkBarrier") } - if !writeBarrier.needed { + if !writeBarrier.enabled { return } ptrmask := typ.GCData |
