blob: 2883ac98c280ca429f25f5571805d02fa09be96b [file] [log] [blame]
Dmitry Vyukov5c9a8752016-03-22 14:27:30 -07001#ifndef _LINUX_KCOV_H
2#define _LINUX_KCOV_H
3
4#include <uapi/linux/kcov.h>
5
6struct task_struct;
7
8#ifdef CONFIG_KCOV
9
10void kcov_task_init(struct task_struct *t);
11void kcov_task_exit(struct task_struct *t);
12
13enum kcov_mode {
14 /* Coverage collection is not enabled yet. */
15 KCOV_MODE_DISABLED = 0,
16 /*
17 * Tracing coverage collection mode.
18 * Covered PCs are collected in a per-task buffer.
19 */
20 KCOV_MODE_TRACE = 1,
21};
22
23#else
24
25static inline void kcov_task_init(struct task_struct *t) {}
26static inline void kcov_task_exit(struct task_struct *t) {}
27
28#endif /* CONFIG_KCOV */
29#endif /* _LINUX_KCOV_H */