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