This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 47793 - Support relative paths using -fprofile-generate
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Martin Thuresson <martint at google dot com>
- Date: Fri, 13 May 2011 00:48:10 +0200
- Subject: Re: PR 47793 - Support relative paths using -fprofile-generate
- References: <AANLkTimkRXMEH5QzVpcaxNZMaK=CE-w7tAXF=1yxQxNZ@mail.gmail.com> <AANLkTi=B8wq3uxBP3Kzk3jGw6Rn=jAjf6oAhFG_jqxj8@mail.gmail.com> <AANLkTinDEr9k0GGgaJHbYSjuLwcSu6gB=HKn12G0bx0z@mail.gmail.com> <BANLkTimw=auKxvktGf_1Ceu7LJJ6NKq=9w@mail.gmail.com>
> Is this patch ok for trunk?
Hi,
the patch is OK.
Sorry for delayed reply, I was very busy by the inliner/thunk bits and this code
is not really in my area of expertise, so it needed some consideration to make sense
of it.
Honza
>
> Allowing relative path in -fprofile-generate= is very useful when
> running the program remotely -- the profile data will be just dumped
> in the dir relative to the working dir in the remote machine. Using
> GCOV_PREFIX_STRIP can workaround the problem, but it is not always to
> pass environment around.
>
> Thanks,
>
> David
>
> On Wed, Feb 23, 2011 at 3:37 PM, Martin Thuresson <martint@google.com> wrote:
> > On Wed, Feb 23, 2011 at 10:21 AM, Martin Thuresson <martint@google.com> wrote:
> >> Change 165596 and 168475 updated the code for handling gcda-paths. As
> >> part of this change, relative paths stopped working.
> >>
> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47793
> >>
> >> This patch adds a guard so that "/" is not added when no prefix is
> >> given.
> >>
> >> The added testcase uses the path "../gcc/". This puts the gcda in the
> >> same directory, so that the cleanup-coverage-files will find them.
> >>
> >> I have tested the patch using "make bootstrap; make -k check" with
> >> target x86_64-unknown-linux-gnu and saw no additional test failures.
> >>
> >> Let me know if there is any other testing I should do.
> >
> > ChangeLog
> > gcc/
> >
> > 2011-02-23 ?Martin Thuresson ?<martint@google.com>
> >
> > ? ? ? ?PR gcov-profile/47793
> > ? ? ? ?* libgcov.c (gcov_exit): Support relative profile paths.
> >
> > gcc/testsuite/
> >
> > 2011-02-23 ?Martin Thuresson ?<martint@google.com>
> >
> > ? ? ? ?PR gcov-profile/47793
> > ? ? ? ?* gcc.dg/pr47793.c: New.
> >
> >>
> >> Thanks,
> >> Martin
> >>
> >