]> Cypherpunks repositories - gostls13.git/commit
runtime: eliminate remaining recordspan write barriers
authorAustin Clements <austin@google.com>
Wed, 25 Oct 2017 17:46:54 +0000 (13:46 -0400)
committerAustin Clements <austin@google.com>
Sun, 29 Oct 2017 20:22:00 +0000 (20:22 +0000)
commit164e1b84777082d83d659a16fad8e1d0456a8638
tree00d912b849a877e87ae3e403572353553e862c93
parentb78b54ff83bab4587f0df5747f432d1b3e7e6846
runtime: eliminate remaining recordspan write barriers

recordspan has two remaining write barriers from writing to the
pointer to the backing store of h.allspans. However, h.allspans is
always backed by off-heap memory, so let the compiler know this.
Unfortunately, this isn't quite as clean as most go:notinheap uses
because we can't directly name the backing store of a slice, but we
can get it done with some judicious casting.

For #22460.

Change-Id: I296f92fa41cf2cb6ae572b35749af23967533877
Reviewed-on: https://go-review.googlesource.com/73414
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mheap.go
src/runtime/slice.go