diff options
author | Austin Clements <austin@google.com> | 2017-10-30 16:06:19 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2017-10-31 14:03:10 +0000 |
commit | 52cf91a5d5d074d8857f1b7be0fe1bc380ed4869 (patch) | |
tree | b676993892380b3c9cb6377d927ba9872c789f81 /src/runtime/mbarrier.go | |
parent | 5536180ae72e8745c8a831e03f56a86360d76c52 (diff) | |
download | go-52cf91a5d5d074d8857f1b7be0fe1bc380ed4869.tar.gz go-52cf91a5d5d074d8857f1b7be0fe1bc380ed4869.zip |
cmd/compile,runtime: update instrumentation comments
The compiler's instrumentation pass has some out-of-date comments
about the write barrier and some confusing comments about
typedslicecopy. Update these comments and add a comment to
typedslicecopy explaining why it's manually instrumented while none of
the other operations are.
Change-Id: I024e5361d53f1c3c122db0c85155368a30cabd6b
Reviewed-on: https://go-review.googlesource.com/74430
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/mbarrier.go')
-rw-r--r-- | src/runtime/mbarrier.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/mbarrier.go b/src/runtime/mbarrier.go index cb2959fbc3..e28bdb8b8d 100644 --- a/src/runtime/mbarrier.go +++ b/src/runtime/mbarrier.go @@ -326,6 +326,10 @@ func typedslicecopy(typ *_type, dst, src slice) int { dstp := dst.array srcp := src.array + // The compiler emits calls to typedslicecopy before + // instrumentation runs, so unlike the other copying and + // assignment operations, it's not instrumented in the calling + // code and needs its own instrumentation. if raceenabled { callerpc := getcallerpc() pc := funcPC(slicecopy) |