aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-01-17 14:53:44 +0100
committerAndrey Konovalov <andreyknvl@gmail.com>2019-01-17 16:06:59 +0100
commit2cd76d213763c45f05fa0a26d518d6a040c7c8dd (patch)
treece22e5ce057a0e93dfbf11ece83550152a5abf5f /executor
parent769e75ed8e06265afdd9b61898b34439086b0028 (diff)
kcov: some fixes for extra coverage
Use PC tracing mode when detecting KCOV_REMOTE_ENABLE support in the kernel. Also fix kcov_remote_handle_usb argument.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_linux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 68b143ba0..a1ef8bd4c 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -93,7 +93,7 @@ static void cover_enable(cover_t* cov, bool collect_comps, bool extra)
// Coverage buffer size of remote threads.
arg.area_size = kExtraCoverSize * (is_kernel_64_bit ? 8 : 4);
arg.num_handles = 1;
- arg.handles[0] = kcov_remote_handle_usb(procid);
+ arg.handles[0] = kcov_remote_handle_usb(procid + 1);
arg.common_handle = procid + 1;
if (ioctl(cov->fd, KCOV_REMOTE_ENABLE, &arg))
exitf("cover enable write trace failed");