]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, runtime: add go:yeswritebarrierrec pragma
authorAustin Clements <austin@google.com>
Mon, 10 Oct 2016 20:46:28 +0000 (16:46 -0400)
committerAustin Clements <austin@google.com>
Sat, 15 Oct 2016 17:58:11 +0000 (17:58 +0000)
commita9e6cebde21875379ccc05d680b3c3a78adbf089
treee569ea3996210899df8e65f8d6efdd26ca0a04a2
parent6347367be36df608cce84beb097378f8654dd208
cmd/compile, runtime: add go:yeswritebarrierrec pragma

This pragma cancels the effect of go:nowritebarrierrec. This is useful
in the scheduler because there are places where we enter a function
without a valid P (and hence cannot have write barriers), but then
obtain a P. This allows us to annotate the function with
go:nowritebarrierrec and split out the part after we've obtained a P
into a go:yeswritebarrierrec function.

Change-Id: Ic8ce4b6d3c074a1ecd8280ad90eaf39f0ffbcc2a
Reviewed-on: https://go-review.googlesource.com/30938
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/lex.go
src/cmd/compile/internal/gc/ssa.go
src/runtime/HACKING.md [new file with mode: 0644]
src/runtime/proc.go
test/nowritebarrier.go [new file with mode: 0644]