]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/linux/kcov.h
kernel-add-kcov-code-coverage-fix
[karo-tx-linux.git] / include / linux / kcov.h
1 #ifndef _LINUX_KCOV_H
2 #define _LINUX_KCOV_H
3
4 #include <uapi/linux/kcov.h>
5
6 struct task_struct;
7
8 #ifdef CONFIG_KCOV
9
10 void kcov_task_init(struct task_struct *t);
11 void kcov_task_exit(struct task_struct *t);
12
13 enum kcov_mode {
14         /*
15          * Tracing coverage collection mode.
16          * Covered PCs are collected in a per-task buffer.
17          */
18         KCOV_MODE_TRACE = 1,
19 };
20
21 #else
22
23 static inline void kcov_task_init(struct task_struct *t) {}
24 static inline void kcov_task_exit(struct task_struct *t) {}
25
26 #endif /* CONFIG_KCOV */
27 #endif /* _LINUX_KCOV_H */