This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Testing patch to make FDO profile data tolerate more source changes
- From: Andrew Pinski <pinskia at gmail dot com>
- To: janis187 at us dot ibm dot com
- Cc: Neil Vachharajani <nvachhar at google dot com>, gcc at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>, jh at suse dot cz, nathan at codesourcery dot com
- Date: Mon, 30 Mar 2009 16:41:47 -0700
- Subject: Re: Testing patch to make FDO profile data tolerate more source changes
- References: <b3d309910903301353re2ffbb3p5d92cefd26e1f224@mail.gmail.com> <1238449836.6099.17.camel@janis-laptop>
On Mon, Mar 30, 2009 at 2:50 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> On Mon, 2009-03-30 at 13:53 -0700, Neil Vachharajani wrote:
>> Hello,
>>
>> I'm working on a patch which makes FDO profile data more robust to
>> source changes. ÂBefore I sent the patch to the list for review, I was
>> wondering how to write a test for this situation. ÂIn particular, what
>> I would like to have is two source files which are similar but not the
>> same. ÂThe first should be compiled and run to generate profile data,
>> and the generated .gcda file should be used to compile the second
>> file. ÂI wasn't quite sure how to do this within the DejaGNU framework
>> and was wondering if anyone had some pointers.
>
> Existing FDO tests use lib/profopt.exp via g++.dg/bprob/bprob.exp
> and gcc.misc-tests/bprob.exp. ÂYou can copy those .exp files to
> variants that use different versions of the source file for the
> two compiles. ÂLet me know if you have further questions.
Or even better just use a define which allows you to select the before
and after code. I think there might be already testcases in the
testsuite that do that.
Thanks,
Andrew Pinski