I tried to use gcov kernel patch for 2.6.3 and get coverage for one
module,(I did not open the option "Profile entire Kernel")
How should I add the gcc parameter?
I tried to add in fs/ntfs/Makefile:
EXTRA_CFLAGS +=3D $(GCOV_FLAGS)
it does not work.
if add as:
EXTRA_CFLAGS +=3D -fprofile-arcs -ftest-coverage
the .bb and .bbg files are generated in the SRCROOT, not
Intel China Software Lab.
Opinions are my own and don't represent those of my employer=20
From: Peter Oberparleiter <oberpapr@so...> - 2004-04-20 12:47:12
On Tue, 2004-04-20 at 08:45, Ling, Xiaofeng wrote:
> I tried to add in fs/ntfs/Makefile:
> EXTRA_CFLAGS += $(GCOV_FLAGS)
> it does not work.
> if add as:
> EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage
> the .bb and .bbg files are generated in the SRCROOT, not
you've discovered two bugs in the gcov-kernel patch:
1. the GCOV_FLAGS variable isn't exported to sub-directory Makefiles
2. building a kernel in a separate object directory doesn't work if
CONFIG_GCOV_ALL isn't set.
I fixed those bugs - the LTP CVS repository now contains the corrected
patch versions for linux-2.6.4 and linux-2.6.5.
The correct way to instrument a subdirectory is, as you stated, to add
EXTRA_CFLAGS += $(GCOV_FLAGS)
to the respective Makefile.