summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/kcov.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/kernel/kcov.go')
-rw-r--r--pkg/sentry/kernel/kcov.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/kcov.go b/pkg/sentry/kernel/kcov.go
index aad63aa99..d3e76ca7b 100644
--- a/pkg/sentry/kernel/kcov.go
+++ b/pkg/sentry/kernel/kcov.go
@@ -89,6 +89,10 @@ func (kcov *Kcov) TaskWork(t *Task) {
kcov.mu.Lock()
defer kcov.mu.Unlock()
+ if kcov.mode != linux.KCOV_TRACE_PC {
+ return
+ }
+
rw := &kcovReadWriter{
mf: kcov.mfp.MemoryFile(),
fr: kcov.mappable.FileRange(),