Fwd: Re: How to decrease size of j2sdk_image
Daniel D. Daugherty
daniel.daugherty at oracle.com
Thu Oct 11 14:35:20 UTC 2012
On 10/11/12 3:21 AM, Seán Coffey wrote:
> Moving this off discuss mailing list to build-dev.
> Why is ENABLE_FULL_DEBUG_SYMBOLS being set to 1 for many product
> builds now ? It slows down the build and creates increased bundle size
> even though the majority of users do not require this functionality.
The Full Debug Symbols feature will eventually be enabled for all
OSes for which Oracle generates bits. I think MacOS X is the last
platform and that work is tracked by:
7165611 3/3 implement Full Debug Symbols on MacOS X
The default setting for ENABLE_FULL_DEBUG_SYMBOLS is "1" (enabled)
because the Full Debug Symbols feature is intentionally enabled in
all promoted bits for diagnosibility and debuggability. If FDS is
not enabled when the promoted bits are built, then the debug info
generated by a rebuild of *exactly the same source* with FDS enabled
cannot be (reliably) used with the promoted bits.
You might be saying:
That's fine for promoted bits, but what about the rest of us?
The answer there is actually simple. We want our developer private
builds and automated system builds, e.g., JPRT, to match what Release
Engineering builds. We don't want RE to be surprised by an integration
that builds fine when FDS is disabled only to blow up when FDS is
Similarly, we also don't want SQE/SQA to be surprised by different
test results with bits built by RE versus bits built with FDS disabled,
e.g., JPRT. Enabling "debug info" in a build changes the compiler
optimizations and that changes the bits in the binary. Those changes
in the binary might mask a bug that only shows up after RE has built
with FDS enabled. Conversely, if you disable FDS in your private build,
you might end up chasing a bug that only reproduces in your private
build and doesn't reproduce in an FDS enabled build.
> Could we consider flipping the default for ENABLE_FULL_DEBUG_SYMBOLS
> to 0 ? (like I've done for all my build scripts?)
For the reasons I stated above, no we won't change the default for
ENABLE_FULL_DEBUG_SYMBOLS to "0" (disabled) unless Oracle changes
the way that promoted bits are built.
You are welcome to disable the feature in your private builds which
is why I added the ENABLE_FULL_DEBUG_SYMBOLS flag. However, please
remember that any testing that you do with those bits won't necessarily
match testing done with the official promoted bits.
> -------- Original Message --------
> Subject: Re: How to decrease size of j2sdk_image
> Date: Thu, 11 Oct 2012 14:57:46 +0800
> From: Weijun Wang <weijun.wang at oracle.com>
> To: discuss at openjdk.java.net
> You can try set ENABLE_FULL_DEBUG_SYMBOLS to 0.
> On 10/11/2012 02:38 PM, matchew wrote:
> > After successful openJDK7 build (Ubuntu 12.04) i have found that
> > 'j2sdk-image' has 240MB. More than 100MB belongs to one directory:
> > openjdk7/jre/lib/amd64
> > Can anyone explain me why it is so big? For example in openJDK7 installed
> > via package manager this folder has only 18MB
> > Is there any way to decrease its size?
> > Thanks in advance
> > --
> > Mateusz
More information about the build-dev