[Bug 3123] Some object files built without -fPIC on x86 only

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Wed Aug 3 03:27:53 UTC 2016


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3123

--- Comment #1 from Andrew John Hughes <gnu.andrew at redhat.com> ---
Sun introduced a patch in 2007 to use 'partial PIC' on x86 [0]. This was done
due to measured pause time improvements in the GC, due to non-PIC code
freeing up one of the limited number of x86 registers and removing a level
of indirection:

"there is an overhead associated with position-independent code, because every
access to global variables needs to go through Global Offset Table (GOT) first
(GOT-indirect). On x86, a register (%ebx) must be set aside to access GOT.
PIC code is less efficient than non-PIC code due to the extra level of
indirection.... On Solaris x86, with the change, we saw up to 10% reduction of
GC pause time with serial collector and 6.23% with CMS collector and 3.5%
reduction with parallel collector. There are almost no regressions in terms of
performance except we loose some sharability (about 5%) and we saw 10% startup
time increase on applications such as Noop. This is mostly due to the
additional relocations caused by the non-PIC code. I consider these as decent
trade-offs." [0]

Not only are the results dated, but the biggest gains are for collectors that
are less used now, they only list results for Solaris and x86 tends to be used
for short-lived applications, where such an increase in start time may not be
a 'decent trade-off' for pause time reduction.

We've been reverting this change since IcedTea began. I traced the first patch
back to:

changeset:   25:e19c20030ba4
user:        Thomas Fitzsimmons  <fitzsim at redhat.com>
date:        Mon Jun 18 12:52:52 2007 -0400
summary:     Add patches/icedtea-text-relocations.patch.

but couldn't find any mailing list discussion of this. There was however a
discussion when the patch needed to be added again, due to 6454213 coming in
from upstream (prior to that, PIC was off for all objects on x86) [1]. This was
also supported by our own performance measurements:

"we did very extensive performance measurements with SPEC jvm 2008,
which has a fairly wide range of real-life applications, and the difference
was so slight as to be down in the noise." [2]

If that was true with GCC 4.3 and the older GCs, and we are still turning PIC
back on for IcedTea 1.x [3] and IcedTea 2.x [4], we should really look at
getting this back into IcedTea 3.x. It has been ported over to the new HotSpot
build [5], but there's no indication whether that was a deliberate choice or
just a direct port of the old build.


[0] https://bugs.openjdk.java.net/browse/JDK-6454213
[1]
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-December/004300.html
[2]
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-December/004346.html
[3]
http://icedtea.classpath.org/hg/release/icedtea6-1.13/file/tip/patches/hotspot/hs23/text-relocations.patch
[4]
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot/rev/8e3defb263a99
[5]
http://hg.openjdk.java.net/jdk9/jdk9/hotspot/file/tip/make/lib/JvmOverrideFiles.gmk

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20160803/c235f507/attachment.html>


More information about the distro-pkg-dev mailing list