This is the mail archive of the gcc-bugs@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]

[Bug gcov-profile/54487] [4.8 Regression] profiledbootstrap broken by r190952


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54487

--- Comment #24 from Teresa Johnson <tejohnson at google dot com> 2012-09-11 18:57:05 UTC ---
On Tue, Sep 11, 2012 at 11:14 AM, markus at trippelsdorf dot de
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54487
>
> --- Comment #23 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-09-11 18:14:52 UTC ---
> gcc/gcov-io.h has:
> #if defined (HOST_HAS_F_SETLKW)
> #define GCOV_LOCKED 1
> #else
> #define GCOV_LOCKED 0
> #endif
>
> But HOST_HAS_F_SETLKW isn't defined anywhere else AFAICS:
> gcc % git grep HOST_HAS_F_SETLKW
> gcc/gcov-io.h:#if defined (HOST_HAS_F_SETLKW)
> gcc %

Maybe it is as simple as that?! I thought I saw that GCOV_LOCKED was
set for my compile, but that may have been on the libgcov compile.

In fact, just above the code Markus shows from gcov-io.h, when
IN_LIBGCOV, GCOV_LOCKED is set based on TARGET_POSIX_IO:

#if defined (TARGET_POSIX_IO)
#define GCOV_LOCKED 1
#else
#define GCOV_LOCKED 0
#endif

Indeed, when I look at the preprocessed libgcov.c output from its
compile command, the GCOV_LOCKED is clearly set (by looking at the
preprocessed gcov_open() code).

But when I use the compile command for coverage.c, which includes
gcov-io.c but is !IN_LIBGCOV (so GCOV_LOCKED is set based on
HOST_HAS_F_SETLKW), the preprocessed gcov_open code is that of a
!GCOV_LOCKED compile, without the call to fcntl.

So perhaps it is just the case that the libgcov code is that writes
the gcda files is doing the locking, but the read on profile-use is
not!

Anyone know how HOST_HAS_F_SETLKW was supposed to be set? I do see
that my configure is setting HAVE_FCNTL_H, perhaps that was intended?

Teresa

>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.


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