This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: excluding files from generating profile data
- From: Ian Lance Taylor <iant at google dot com>
- To: Matt <matt at use dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 06 May 2009 13:32:57 -0700
- Subject: Re: excluding files from generating profile data
- References: <Pine.NEB.4.64.0905061249180.16489@cesium.clock.org>
Matt <matt@use.net> writes:
> In using the gcov options to measure our unit test coverage, we are
> getting low coverage numbers being reported for various directories
> under bits/. I assume this is due to our inclusion of <vector> in the
> program we are measuring coverage on.
>
> With both GCC 4.3.3 and GCC 4.4, we have been unable to filter out
> these extraneous coverage bits. We have tried both the
> -finstrument-functions-exclude-file-list and
> -finstrument-functions-exclude-function-list options, neither of which
> seem to have any effect on the coverage data being generated.
>
> How can we exclude the calculation of the coverage of the files in the
> gcc's bits/ directory?
Those options only affect -finstrument-functions. They do not affect
coverage, which is controlled by -fprofile-arcs/-ftest-coverage/
--coverage. Unfortunately I don't know of any way to control coverage
information for a specific function, or to ignore certain inlined
functions.
Ian