This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Test Coverage not on whole execution (gcov)
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: Fabien Baron <fabien dot baron at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 01 May 2008 18:16:16 +1000
- Subject: Re: Test Coverage not on whole execution (gcov)
- References: <5fb82b200804300201n4c08182w6c7daffac80dd9db@mail.gmail.com>
On Wed, 2008-04-30 at 11:01 +0200, Fabien Baron wrote:
> I'm working on a big project in C code, and I want to profile it so I
> used gcc with the options -ftest-coverage and -fprofile-arcs, and gcov
> to analyze the results. It works very well but on the whole project
> and the whole execution !!
> My question is :
> Is it possible to start and stop profiling/coverage during the program
> execution ? If it is how I can do that ?
You should not need to compile every object file in the project with
those options. Just compile the ones you want to generate coverage data
for (of course you will need those options to link).
By the way, you really should use --coverage to preserve your
sanity. ;-)
Cheers, Ben