OSDN Git Service

random: use chacha20 for get_random_int/long
[sagit-ice-cold/kernel_xiaomi_msm8998.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 enum kcov_mode {
11         /* Coverage collection is not enabled yet. */
12         KCOV_MODE_DISABLED = 0,
13         /* KCOV was initialized, but tracing mode hasn't been chosen yet. */
14         KCOV_MODE_INIT = 1,
15         /*
16          * Tracing coverage collection mode.
17          * Covered PCs are collected in a per-task buffer.
18          */
19         KCOV_MODE_TRACE_PC = 2,
20         /* Collecting comparison operands mode. */
21         KCOV_MODE_TRACE_CMP = 3,
22 };
23
24 void kcov_task_init(struct task_struct *t);
25 void kcov_task_exit(struct task_struct *t);
26
27 #else
28
29 static inline void kcov_task_init(struct task_struct *t) {}
30 static inline void kcov_task_exit(struct task_struct *t) {}
31
32 #endif /* CONFIG_KCOV */
33 #endif /* _LINUX_KCOV_H */