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