|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Public API for dumping GCC gcov code coverage data. More...
Go to the source code of this file.
Functions | |
| void | gcov_coverage_dump (void) |
| Dump all collected gcov coverage data. | |
| void | gcov_coverage_dump_tagged (const char *tag) |
| Dump gcov coverage data tagged with a label. | |
| void | gcov_coverage_semihost (void) |
| Dump all collected gcov coverage data over semihosting. | |
| void | gcov_static_init (void) |
| Initialize the gcov runtime. | |
Public API for dumping GCC gcov code coverage data.
| void gcov_coverage_dump | ( | void | ) |
Dump all collected gcov coverage data.
Retrieve the gcov coverage data for every registered object and send it over the transport selected by the coverage dump method (CONFIG_COVERAGE_DUMP for the console or CONFIG_COVERAGE_SEMIHOST for the host filesystem). This is the untagged form and is equivalent to gcov_coverage_dump_tagged() with a NULL tag.
| void gcov_coverage_dump_tagged | ( | const char * | tag | ) |
Dump gcov coverage data tagged with a label.
Retrieve the gcov coverage data and emit it over the configured transport, associating the dump with tag so a consumer can attribute it to a single producer (for example an individual test case).
The tag is carried differently depending on the selected dump method:
CONFIG_COVERAGE_DUMP): tag is appended to the GCOV_COVERAGE_DUMP_START marker that frames the data.CONFIG_COVERAGE_SEMIHOST): each .gcda is written to a path formed by appending @@ and the tag to the file name (for example foo.gcda@@suite.test) instead of its canonical path, so that several isolated dumps can coexist next to the matching .gcno without overwriting one another.When tag is not NULL, objects that have recorded no coverage are skipped, keeping tagged (per-producer) dumps small. Passing NULL reproduces the historical, untagged behaviour and dumps every object.
| tag | Label to attribute the dump to, or NULL for an untagged dump. |
| void gcov_coverage_semihost | ( | void | ) |
Dump all collected gcov coverage data over semihosting.
Write the gcov coverage data for every registered object to the host filesystem using semihosting. Available only when the semihosting dump method (CONFIG_COVERAGE_SEMIHOST) is selected. This is the untagged form.
| void gcov_static_init | ( | void | ) |
Initialize the gcov runtime.
Invoke the gcov constructors so that each instrumented object registers its gcov_info with the runtime. Must run before any coverage data is dumped.