It turns out there is no other problem on 4.6.   The compiler in the
ubuntu-toolchain-r/test ppa does not build Python at all due to PR
47271.  After adding the fix for this PR to the ppa package, the
compiler runs into the exact same problem as described for 4.5 in the
previous comment.  By using -fprofile-correction as above, I was able to
successfully build the python3.2-3.2~rc1 package with profile-directed
feedback enabled (on i386).

So to summarize the problems discussed in this thread:

- GCC 4.6 had a regression where it failed to built Python at all.  This
is PR 47271, and is already fixed in mainline.

- GCC (any version!) uses thread-unsafe code to update profile counters,
which means they can always be slightly wrong when profiling multi-
threaded code, and therefore inconsistent with the flow graph.  This
will happen most frequently on multi-core machines, and in functions
that experience high thread contention.  The problem can be worked
around using -fprofile-correction.  Using this flag should enable
profiled builds of Python with (at least) GCC 4.5 and 4.6.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/598462

Title:
   [PR38292] corrupted profile info with -O[23] -fprofile-use

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to