]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/kcov.h
ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
[mirror_ubuntu-bionic-kernel.git] / include / linux / kcov.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
5c9a8750
DV
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
5c9a8750
DV
11enum kcov_mode {
12 /* Coverage collection is not enabled yet. */
13 KCOV_MODE_DISABLED = 0,
ded97d2c
VC
14 /* KCOV was initialized, but tracing mode hasn't been chosen yet. */
15 KCOV_MODE_INIT = 1,
5c9a8750
DV
16 /*
17 * Tracing coverage collection mode.
18 * Covered PCs are collected in a per-task buffer.
19 */
ded97d2c
VC
20 KCOV_MODE_TRACE_PC = 2,
21 /* Collecting comparison operands mode. */
22 KCOV_MODE_TRACE_CMP = 3,
5c9a8750
DV
23};
24
ded97d2c
VC
25void kcov_task_init(struct task_struct *t);
26void kcov_task_exit(struct task_struct *t);
27
5c9a8750
DV
28#else
29
30static inline void kcov_task_init(struct task_struct *t) {}
31static inline void kcov_task_exit(struct task_struct *t) {}
32
33#endif /* CONFIG_KCOV */
34#endif /* _LINUX_KCOV_H */