gcov question

Johnson, Matt mattj@qualcomm.com
Thu Aug 9 21:27:00 GMT 2012

Hello all,

I'm testing out feedback optimization on a sample piece of code.  I noticed that the .gcno file that is output lists 10 blocks, yet the .gcda file that is produced when I execute only contains 7 counts.  I thought these were supposed to correspond, but perhaps not?  Can anyone explain?

My compile command:
gcc -g -fprofile-generate -ftest-coverage fib.c -o fib

I ran ./fib and was prompted for an input; I gave it  5.

GCC Version:
gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Matthew Johnson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fib.tar.gz
Type: application/x-gzip
Size: 9386 bytes
Desc: fib.tar.gz
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20120809/6e7b4f86/attachment.bin>

More information about the Gcc mailing list