aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@fubar.geek.nz>2019-06-03 13:19:51 +0000
committerDmitry Vyukov <dvyukov@google.com>2019-06-04 16:24:36 +0200
commitbfb4a51e30c8c04658a2675333b9b89a9d327c4a (patch)
tree7a0bd32ab317f8652e12bed660c84eb97984c693 /executor/executor_linux.h
parentad87cdf3c743711389a67930d722e89c127ab1e5 (diff)
executor: Protect the coverage buffer
Add functions to protect and unprotect the coverage buffer. The buffer is protected from being written to while tracing. When the trace data is sorted we need to make it read/write, but can return it to read only after this has completed. Leave the first page as read/write as we need to clear the length field.
Diffstat (limited to 'executor/executor_linux.h')
-rw-r--r--executor/executor_linux.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 867f1ec4d..fdd274162 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -75,6 +75,14 @@ static void cover_open(cover_t* cov, bool extra)
cov->data_end = cov->data + mmap_alloc_size;
}
+static void cover_protect(cover_t* cov)
+{
+}
+
+static void cover_unprotect(cover_t* cov)
+{
+}
+
static void cover_enable(cover_t* cov, bool collect_comps, bool extra)
{
int kcov_mode = collect_comps ? KCOV_TRACE_CMP : KCOV_TRACE_PC;