]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: disable instrumentation for no-race packages earlier
authorMatthew Dempsky <mdempsky@google.com>
Tue, 27 Mar 2018 22:35:51 +0000 (15:35 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 2 Apr 2018 21:50:05 +0000 (21:50 +0000)
commitc0841ecd87a5a91cdd5e2c376d46230988a37ada
treefaf178e66ffd5a05c4055a66eb8b3b740311240b
parent690324408f4e28449e81032204596880ce45dde8
cmd/compile: disable instrumentation for no-race packages earlier

Rather than checking for each function whether the package supports
instrumentation, check once up front.

Relatedly, tweak the logic for preventing inlining calls to runtime
functions from instrumented packages. Previously, we simply disallowed
inlining runtime functions altogether when instrumenting. With this
CL, it's only disallowed from packages that are actually being
instrumented. That is, now intra-runtime calls can be inlined.

Updates #19054.

Change-Id: I88c97b48bf70193a8a3ee18d952dcb26b0369d55
Reviewed-on: https://go-review.googlesource.com/102815
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/racewalk.go