This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use of option -fprofile-arcs is not compatible with -fprofile-use


sorry that I couldn't re-produce the warning as you said.

micro# /import/dr3/s10/gcc-4.2/bin/gcc val-prof-1.c -fprofile-arcs -g
-o val-prof-1.x1
micro# /import/dr3/s10/gcc-4.2/bin/gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /import/dr2/starlex/1/gcc-4.2-20070228/configure
--prefix=/import/dr3/s10/gcc-4.2 --enable-languages=c,c++,fortran
--enable-rpath --with-mpfr=/import/dr3/s10/gcc-4.2
--with-gmp=/import/dr3/s10/gcc-4.2
Thread model: posix
gcc version 4.2.0 20070228 (prerelease)

so is gcc-4.3 on the platform.

2008/5/7 Edmar Wienskoski-RA8797 <edmar@freescale.com>:
> I said if you compile val-prof-1.c the same way bprob-1.c is compiled you
> get an warning.
>
>
>  gcc -g -fprofile-arcs val-prof-1.c -o val-prof-1.x1
>
>
>
>
>  Lijuan Hai wrote:
>
> > seen in gcc-4.2, gcc.misc-tests/bprob-1.c is compiled with
> > -fprofile-arcs and -fbranch-probabilities.
> > gcc.dg/tree-prof/val-prof-1.c is compiled with -fprofile-generate and
> > -fprofile-use. so there won't be any warnings.
> >
> > 2008/4/25 Edmar Wienskoski-RA8797 <edmar@freescale.com>:
> >
> >
> > > The test case gcc.misc/bprob-1.c is compiled with fprofile-arcs /
> > > fprofile-use.
> > >
> > >  The option fprofile-arcs does not enable value profiling.
> > >
> > >  At the second stage compilation, the option fprofile-use enables value
> > > profiling. Within tree_find_values_to_profile, if one of the value
> > > optimizations algorithms sees an optimization opportunity, it will push
> an
> > > histogram on stack. Later, compute_value_histograms will call
> > > get_coverage_counts to load this histogram, but none where generated.
> > >
> > >  A warning is issued which means a FAIL under dejagnu.
> > >
> > >  I found this problem with bprob-1.c while debugging a new value profile
> > > optimization. But it can be reproduced in any target, with non-modified
> gcc,
> > > at any optimization level, using one of the value profile test cases and
> > > compiler options fprofile-arcs / fprofile-use (same used with
> bprob-1.c).
> > >
> > >  Here is an example using gcc.dg/tree-prof/val-prof-1.c:
> > >  ./gcc-trunk-reference/install_e600/bin/gcc -g -fprofile-arcs
> val-prof-1.c
> > > -o val-prof-1.x1
> > >  ./val-prof-1.x1
> > >  ./gcc-trunk-reference/install_e600/bin/gcc -g -fprofile-use
> val-prof-1.c -o
> > > val-prof-1.x2
> > >  val-prof-1.c: In function 'main':
> > >  val-prof-1.c:17: warning: no coverage for function 'main' found
> > >
> > >  IMHO there are 3 ways to go with this:
> > >  1 - Require user behavior change (create new option -fprofile-arcs-use
> to
> > > match -fprofile-arcs, mismatch of options is bad user behavior)
> > >  2 - Record on the .gcda file how the first stage were done
> (fprofile-arcs /
> > > fprofile-generate, etc) and use it to disable other optimizations under
> > > fprofile-use (Does this already exists ?, I am not familiar with the
> .gcda
> > > layout)
> > >  3 - Let get_coverage_counts ignore inconsistencies when loading data.
> > >
> > >  Helps / comments are appreciated.
> > >
> > >  Edmar
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>



-- 
 Best wishes!
Yours,
Lijuan Hai
 _ _
 (_)(_)
 (,,)
 =()=
 ((__)\
 _|L\_______/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]