aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2021-01-21 10:52:04 -0800
committerDmitry Vyukov <dvyukov@google.com>2021-01-22 20:14:55 +0100
commit8db6c2cdce6b716eae80719382d82be911c2bc02 (patch)
tree01c6662481966e5e28311490885811a71ad7437a
parentd4f4eca56fbea6f58a4d5adfd19cb5e0dc32fe46 (diff)
pkg/build: exclude gvisor pkg/coverage from coverage instrumentation
Instrumenting this package is too slow--every time the Sentry switches to the application, task work will iterate through all of the coverage counters. Instrumenting this code path will add many atomic operations on race builds, drastically degrading performance.
-rw-r--r--pkg/build/gvisor.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/build/gvisor.go b/pkg/build/gvisor.go
index 3369e6f16..b8ef1781c 100644
--- a/pkg/build/gvisor.go
+++ b/pkg/build/gvisor.go
@@ -33,7 +33,8 @@ func (gvisor gvisor) build(params *Params) error {
if coverageEnabled(config) {
coverageFiles := "//pkg/..."
exclusions := []string{
- "//pkg/sentry/platform", // Breaks kvm.
+ "//pkg/sentry/platform", // Breaks kvm.
+ "//pkg/coverage:coverage", // Too slow.
}
if race {
// These targets use go:norace, which is not