summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2018-01-19 09:30:28 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-19 09:30:27 -0800
commit54b0b96ecd63e3b9058c6367b1ba5b2d5bfb79e5 (patch)
treef2ab13642f9621f1cb0e3413e4b79b96b2d60ff6 /include/uapi/linux
parent188c08e1bf42f86dca5bb4bb96626b54ead40460 (diff)
parentde3efc405c531961da26b6b256389ca2f3350460 (diff)
Merge "Merge android-4.4.110 (5cc8c2e) into msm-4.4"
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/kcov.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/uapi/linux/kcov.h b/include/uapi/linux/kcov.h
new file mode 100644
index 000000000000..33b826b9946e
--- /dev/null
+++ b/include/uapi/linux/kcov.h
@@ -0,0 +1,34 @@
+#ifndef _LINUX_KCOV_IOCTLS_H
+#define _LINUX_KCOV_IOCTLS_H
+
+#include <linux/types.h>
+
+#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
+#define KCOV_ENABLE _IO('c', 100)
+#define KCOV_DISABLE _IO('c', 101)
+
+enum {
+ /*
+ * Tracing coverage collection mode.
+ * Covered PCs are collected in a per-task buffer.
+ * In new KCOV version the mode is chosen by calling
+ * ioctl(fd, KCOV_ENABLE, mode). In older versions the mode argument
+ * was supposed to be 0 in such a call. So, for reasons of backward
+ * compatibility, we have chosen the value KCOV_TRACE_PC to be 0.
+ */
+ KCOV_TRACE_PC = 0,
+ /* Collecting comparison operands mode. */
+ KCOV_TRACE_CMP = 1,
+};
+
+/*
+ * The format for the types of collected comparisons.
+ *
+ * Bit 0 shows whether one of the arguments is a compile-time constant.
+ * Bits 1 & 2 contain log2 of the argument size, up to 8 bytes.
+ */
+#define KCOV_CMP_CONST (1 << 0)
+#define KCOV_CMP_SIZE(n) ((n) << 1)
+#define KCOV_CMP_MASK KCOV_CMP_SIZE(3)
+
+#endif /* _LINUX_KCOV_IOCTLS_H */