aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack_test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-05-28 12:37:12 -0400
committerAustin Clements <austin@google.com>2015-06-02 19:59:05 +0000
commit724f8298a80e151088cd5f9342632b6b407fed08 (patch)
treef5bcb9a1c836abfa204c7a97c243aa35faf4cf9f /src/runtime/stack_test.go
parent3f6e69aca585ceaf82595170e5aea5b25a9d29ec (diff)
downloadgo-724f8298a80e151088cd5f9342632b6b407fed08.tar.xz
runtime: avoid double-scanning of stacks
Currently there's a race between stopg scanning another G's stack and the G reaching a preemption point and scanning its own stack. When this race occurs, the G's stack is scanned twice. Currently this is okay, so this race is benign. However, we will shortly be adding stack barriers during the first stack scan, so scanning will no longer be idempotent. To prepare for this, this change ensures that each stack is scanned only once during each GC phase by checking the flag that indicates that the stack has been scanned in this phase before scanning the stack. Change-Id: Id9f4d5e2e5b839bc3f200ec1723a4a12dd677ab4 Reviewed-on: https://go-review.googlesource.com/10458 Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/stack_test.go')
0 files changed, 0 insertions, 0 deletions