I'm building gcc 4.4.0 20090109 on i386-pc-solaris2.11 (OpenSolaris 2008.11). I configured using "--enable-coverage=noopt" (and complained here that it breaks the build http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38776 ) and made by simply typing "gmake". First there is a stage with "-fprofile-arcs -ftest-coverage -frandom-seed=c-lang.o -O0" than another with "-O2 -fprofile-generate", then libgcc is built without either coverage or profiling ... hmmm ... I wanted to tryout how the coverage testing was working so in the root of the build directory I typed: # gcov -b gcc/xgcc xgcc.gcno:cannot open graph file # gprof gcc/xgcc gmon.out: No such file or directory # slocate gmon.out (prints nothing) # slocate gcc.gcno /usr/share/src/gcc_build/gcc/gcc.gcno # cd gcc # cp gcc.gcno xgcc.gcno # gcov -b xgcc xgcc.gcno:version `404e', prefer `304c' xgcc.gcda:cannot open data file # cp gcc.gcda xgcc.gcda # gcov -b xgcc xgcc.gcno:version `404e', prefer `304c' xgcc.gcda:version `404e', prefer version `304c' xgcc.gcda:corrupted 1. Why does gcov complain "version `404e', prefer `304c'" ? Is it saying it wants an _older_ version of gcov ? 2. Should the text be 'more similar' (almost the same) for both these error messages?: xgcc.gcno:version `404e', prefer `304c' xgcc.gcda:version `404e', prefer version `304c' 3. Should gcov 'know' about xgcc ? Do we need a "-DIN_GCC" (type of mechanism) for gcov to tell it to look for xgcc.* whenever it is told to look for gcc.* files (or just look for both and test the checksum to see which is correct)? Thanks, Rob PS: Note the "xgcc.gcda:corrupted" is probably because the tail was corrupted (not copied) and is not a "Bug" that is part of this Report.
I re-checked _which_ gcov was actually being ran it was Sun's. Fixed, by 1 and 2 invalid (old gcov does not read new files). The third Bug is valid still: 'gcov can't find "xgcc.gcno" and "xgcc.gcda" because they are being named "gcc.gcno" and "gcc.gcda". The gcov program should get both.' Rob
The gcov data is based on the source name and not the executable now. So this is invalid.
(In reply to comment #2) > The gcov data is based on the source name and not the executable now. So this > is invalid. That is what I am saying. There should be an exclusion for that one file only. Rob
(In reply to comment #3) > That is what I am saying. There should be an exclusion for that one file only. Why? this is what should be done and how this has been implemented for a long time. -fprofile-arcs does not enable gmon profiling, It enables exact profiling of basic block edges and nothing more.