]> Cypherpunks repositories - gostls13.git/commit
runtime/race: better handling of atomic operations
authorDmitriy Vyukov <dvyukov@google.com>
Mon, 1 Sep 2014 12:04:33 +0000 (08:04 -0400)
committerDmitriy Vyukov <dvyukov@google.com>
Mon, 1 Sep 2014 12:04:33 +0000 (08:04 -0400)
commitf16729781bc7bfe561658f520dcbffa5f81790c2
treeee908ae2068724c8fb56b0b8c4efc474ca03384e
parent553378079522ca9f131c62acf9cc0a583c76164b
runtime/race: better handling of atomic operations
This change fixes the last known false negative of the race detector --
detection of races between mutating atomic operations and non-atomic operations.
Race runtime already has functions for precise modelling of various atomic operations,
so this change just forwards all atomic ops to race runtime
instead of poor man modeling in sync/atomic package.
Performance is also improved -- full sync/atomic tests run in 60s instead of 85s now.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/111310044
src/pkg/runtime/race.c
src/pkg/runtime/race/README
src/pkg/runtime/race/race_darwin_amd64.syso
src/pkg/runtime/race/race_freebsd_amd64.syso
src/pkg/runtime/race/race_linux_amd64.syso
src/pkg/runtime/race/race_windows_amd64.syso
src/pkg/runtime/race/testdata/atomic_test.go
src/pkg/runtime/race_amd64.s
src/pkg/sync/atomic/doc.go
src/pkg/sync/atomic/race.go [deleted file]
src/pkg/sync/atomic/race.s [new file with mode: 0644]