Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / kcov.h
blob3ecf6f5e3a5f01eb81a67d7456868d43e1fd64ce
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_KCOV_H
3 #define _LINUX_KCOV_H
5 #include <uapi/linux/kcov.h>
7 struct task_struct;
9 #ifdef CONFIG_KCOV
11 enum kcov_mode {
12 /* Coverage collection is not enabled yet. */
13 KCOV_MODE_DISABLED = 0,
14 /* KCOV was initialized, but tracing mode hasn't been chosen yet. */
15 KCOV_MODE_INIT = 1,
17 * Tracing coverage collection mode.
18 * Covered PCs are collected in a per-task buffer.
20 KCOV_MODE_TRACE_PC = 2,
21 /* Collecting comparison operands mode. */
22 KCOV_MODE_TRACE_CMP = 3,
25 void kcov_task_init(struct task_struct *t);
26 void kcov_task_exit(struct task_struct *t);
28 #else
30 static inline void kcov_task_init(struct task_struct *t) {}
31 static inline void kcov_task_exit(struct task_struct *t) {}
33 #endif /* CONFIG_KCOV */
34 #endif /* _LINUX_KCOV_H */