at v4.14 30 lines 638 B view raw
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 7struct task_struct; 8 9#ifdef CONFIG_KCOV 10 11void kcov_task_init(struct task_struct *t); 12void kcov_task_exit(struct task_struct *t); 13 14enum 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 26static inline void kcov_task_init(struct task_struct *t) {} 27static inline void kcov_task_exit(struct task_struct *t) {} 28 29#endif /* CONFIG_KCOV */ 30#endif /* _LINUX_KCOV_H */