kcov.h 599 B

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