1 //===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Public interface for sanitizer coverage.
11 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_COVERAG_INTERFACE_H
14 #define SANITIZER_COVERAG_INTERFACE_H
16 #include <sanitizer/common_interface_defs.h>
22 // Initialize coverage.
23 void __sanitizer_cov_init();
24 // Record and dump coverage info.
25 void __sanitizer_cov_dump();
27 // Dump collected coverage info. Sorts pcs by module into individual
29 void __sanitizer_dump_coverage(const uintptr_t *pcs, uintptr_t len);
31 // Open <name>.sancov.packed in the coverage directory and return the file
32 // descriptor. Returns -1 on failure, or if coverage dumping is disabled.
33 // This is intended for use by sandboxing code.
34 intptr_t __sanitizer_maybe_open_cov_file(const char *name);
35 // Get the number of unique covered blocks (or edges).
36 // This can be useful for coverage-directed in-process fuzzers.
37 uintptr_t __sanitizer_get_total_unique_coverage();
42 #endif // SANITIZER_COVERAG_INTERFACE_H