Bug 38784 - gcc 4.4.0 20090109 - Naming xgcc.* gcc.* when configure with "--enable-coverage=noopt"
Summary: gcc 4.4.0 20090109 - Naming xgcc.* gcc.* when configure with "--enable-covera...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: gcov-profile (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-09 15:11 UTC by Rob
Modified: 2009-01-12 19:29 UTC (History)
1 user (show)

See Also:
Host: i386-pc-solaris2.11
Target: i386-pc-solaris2.11
Build: i386-pc-solaris2.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2009-01-09 15:11:48 UTC
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.
Comment 1 Rob 2009-01-09 15:46:03 UTC
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
Comment 2 Andrew Pinski 2009-01-09 20:09:09 UTC
The gcov data is based on the source name and not the executable now.  So this is invalid.
Comment 3 Rob 2009-01-12 14:09:20 UTC
(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
Comment 4 Andrew Pinski 2009-01-12 19:29:02 UTC
(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.