Mailinglist Archive: opensuse-bugs (4297 mails)

< Previous Next >
[Bug 1040589] bash/gcc/gzip/python differ between builds because of profiling
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 24 May 2017 13:29:40 +0000
  • Message-id: <bug-1040589-21960-QKb1lCyvjD@http.bugzilla.novell.com/>
http://bugzilla.novell.com/show_bug.cgi?id=1040589
http://bugzilla.novell.com/show_bug.cgi?id=1040589#c2

--- Comment #2 from Richard Biener <rguenther@xxxxxxxx> ---
(In reply to Bernhard Wiedemann from comment #0)
In https://build.opensuse.org/project/prjconf/openSUSE:Factory
we have
%do_profiling 1

and because of that
in our bash.spec we enable gcc's
'profile feedback directed optimizations'

but that causes the jobs.o and resulting bash binary
to differ between builds, even when running on the same build host.

And because of that, build-compare always thinks there is a change
and triggers a re-publish
and rebuild of depending packages

We also have such binary diffs in gcc6
and gcc6.spec calls a
make profiledbootstrap


The do_profiling macro is used in
bash
gzip
hello
python3-base
python-base
sed
xz

and in
http://rb.zq1.de/compare.factory-20170523/bash-compare.out
http://rb.zq1.de/compare.factory-20170523/gcc6-compare.out
http://rb.zq1.de/compare.factory-20170523/gzip-compare.out
http://rb.zq1.de/compare.factory-20170523/python-base-compare.out
http://rb.zq1.de/compare.factory-20170523/python3-base-compare.out

we have strange diffs in assembler that I could not trace down
to other sources of non-determinism until today.

Is the buildroot 1:1 the same and then you get different code?

Diffs did go away when building without profiling
(it was harder to disable for gcc6 and bash though)


Do the profiles just count invocations of functions
or do they depend on the type and speed of the system?

Just counting. Inconsistencies can pop up when you run the instrumented
binaries in parallel (gcov uses file locking but still we see that happen).

In the first case, it should be possible to fix the profiling runs
to be deterministic, but for that it would be useful
to be able to see the differences between runs.
How could I diff gcc's .gcda files?

There is gcov-dump (might need to pick it up from devel:gcc gcc packages).

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >