[PATCH 00/12] Support gcov instrumentation
chrisj at rtems.org
Fri Jul 1 01:19:57 UTC 2022
On 29/6/2022 4:30 pm, Sebastian Huber wrote:
> This patch set adds support to build the RTEMS libraries with gcov
> instrumentation to get code and branch coverage. There are some improvements
> necessary in the build system to support different compiler flags for libraries
> and tests. In general, code coverage is enabled by the new RTEMS_COVERAGE
> build configuration option.
Does RTEMS_COVERAGE effect covoar and the coverage testing that tool and flow
If this enable is specific to GCC's gcov then maybe we should clearly label it
as that and avoid overloading the term and any possible confusion that might
bring. For example RTEMS_GCOV_CONVERGE?
> The user can fine tune the build through the
> LIBRARY_OPTIMIZATION_FLAGS, TEST_OPTIMIZATION_FLAGS, and COVERAGE_COMPILER_FLAGS,
> COVERAGE_LINKER_FLAGS options.
How would the LTO fat options be added? Would the pattern for
COVERAGE_COMPILER_FLAGS flags be copied to add LTO_COMPILER_FLAGS?
I am a little lost with the difference between LIBRARY_OPTIMIZATION_FLAGS and
OPTIMIZATION_FLAGS? RTEMS is always a library so what is difference between
them? Are the OPTIMIZATION_FLAGS the "-O" ones and still something I can set
from an INI file?
I think the changes to cppflags, cflags and cxxflags are nice and a great
> The gcov information is dumped after each test
> case in a base64 encoded gcfn and gcda data stream. It looks like this:
> *** BEGIN OF GCOV INFO BASE64 ***
> *** END OF GCOV INFO BASE64 ***
> On the host you can decode the block and pipe it through the gcov-tool to
> produce the *.gcda files. Example Python code:
> block = some regex stuff to get the block between the BEGIN/END OF ...
> stream = base64.b64decode(block)
> subprocess.run(["arm-rtems6-gcov-tool", "merge-stream"], input=stream)
Nice. Could rtems-test detect this and then run that command if available?
More information about the devel