We should use CDS to minimize Java startup time during build. We run
multiple Java commands, and every second counts.
On my machine, I get a ~3% build time speedup with this fix.
Bug: https://bugs.openjdk.java.net/browse/JDK-8188312
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8188312-use-CDS-
Hi Magnus,
As I just put in the bug report, it isn't quite this simple. You have to
be able to tolerate/recover from failure to map the shared archive.
Cheers,
David
On 3/10/2017 8:24 PM, Magnus Ihse Bursie wrote:
We should use CDS to minimize Java startup time during build. We run
multiple
Hi,
-Xshare:auto silently ignores failures to map the shared archive and
should be safe to use. I think you're thinking of -Xshare:on which will
fail/abort the VM if mapping fails.
/Claes
On 2017-10-03 12:28, David Holmes wrote:
Hi Magnus,
As I just put in the bug report, it isn't quite t
Hi Claes,
On 3/10/2017 8:48 PM, Claes Redestad wrote:
Hi,
-Xshare:auto silently ignores failures to map the shared archive and
should be safe to use. I think you're thinking of -Xshare:on which will
fail/abort the VM if mapping fails.
Ah okay.
In that case seems reasonable. But please test
Erik J. raises a good point in the bug report that
-XX:SharedArchiveFile=xxx should be used if we create the archive. The
build system has no business creating an archive inside the boot JDK.
David
On 3/10/2017 9:02 PM, David Holmes wrote:
Hi Claes,
On 3/10/2017 8:48 PM, Claes Redestad wrote
On 2017-10-03 14:21, David Holmes wrote:
Erik J. raises a good point in the bug report that
-XX:SharedArchiveFile=xxx should be used if we create the archive. The
build system has no business creating an archive inside the boot JDK.
Agree, that is a better solution. I was not aware of the
-XX
Looks good to me.
Thanks,
David
On 3/10/2017 10:47 PM, Magnus Ihse Bursie wrote:
On 2017-10-03 14:21, David Holmes wrote:
Erik J. raises a good point in the bug report that
-XX:SharedArchiveFile=xxx should be used if we create the archive. The
build system has no business creating an archive
The change looks good, but unfortunately I don't see a lot of gain.
First of all it seems the -XX:SharedArchiveFile option removes a lot of
the performance gain. Here are some rough numbers from my machine. All
of them are "time make images" with a clean build directory, on a 16
core/32 threads
Hello,
According to
http://hg.openjdk.java.net/jdk9/jdk9/file/a08cbfc0e4ec/common/doc/building.html
“msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible
to support in a future version but that would require a community effort to
implement”
I’d like to help making the
Hi Erik,
You might need to verify that CDS was actually used - the -Xshare:auto
will hide failures. Switch to -Xshare:on to see if it actually works.
I haven't tried measuring anything.
David
On 4/10/2017 12:45 AM, Erik Joelsson wrote:
The change looks good, but unfortunately I don't see a l
I gave msys2 a shot some time ago, but it ended up too much trouble.
I'll share some of my notes from that attempt, for what it's worth.
To install package X/Y, run "pacman -S X/Y". Missing tools and packages
where to find them:
cmp: msys/diffutils
tar: msys/tar
make: msys/make
unzip: msys/unz
It might be the case that we should not really continue with this as
long as we have JDK 8 as default boot jdk.
If so, we should at least add a -Xshare:auto, which will allow the user
to manually add a system-wide CDS archive to their boot jdk, and benefit
from it.
And then we'll revisit thi
Actually, it wasn't so much remaining trouble. :-) I fired up msys2 and
checked out where I left off. It turned out that the remaining snag was
that msys2 tries to convert command lines automatically, from "unix"
style paths to "windows" style paths. Unfortunately, it does not do this
very well
If you use SharedArchiveFile, you should set -XX:-VerifySharedSpaces at
the same time.
Long story short -- for security, we don't want bad archives to be
mapped into the JVM.
If you don't specify SharedArchiveFile, the archive is loaded form the
JDK installation directory, and we trust that
14 matches
Mail list logo