If you want a script/hack solution, you should be able to do something like this:

make java.base-java-only JDK_FILTER=package/that/you/changed && make jimages-only

That's likely the best I can do. If you need a real image, it has to be linked from scratch each time. If the exploded image is good enough, it's considerably faster to just build that.

If you are on Windows, Cygwin adds some overhead that we can't get around. It could be worth trying 64bit cygwin and see if you get better performance. I've had mixed results, but on one machine, at least configure runs twice as fast with 64bit cygwin.

/Erik

On 2015-05-22 06:53, Ioi Lam wrote:


On 5/21/15 12:05 AM, Erik Joelsson wrote:

On 2015-05-20 22:39, Alan Bateman wrote:


On 20/05/2015 21:12, Roger Riggs wrote:
Ioi,

You can rebuild just the contents of a single module:

% make java.base java.base-libs java.base-launchers

Yes, and this works great when you are using an exploded build. It's possible that Ioi is looking for an images build of course. In general then this needs sjavac as Joe brings up.

If you have a full image build, make a change to something in java.base, you could do something like this to avoid unnecessary rebuilds:

$ make java.base && make images-only
Thanks for the information.

I tried this on my machine (32-way Xeon E5-2665 0 @ 2.40GHz), but it still takes one minute if I change a single file in java.base :-(

The making of java.base alone took about 30 seconds.

$ time sh -c 'make JOBS=29 java.base && make images-only'
Building target 'java.base' in configuration '/home/iklam/jdk/bld/'
Compiling 2759 files for java.base
Finished building target 'java.base' in configuration '/home/iklam/jdk/bld/'
Building target 'images-only' in configuration '/home/iklam/jdk/bld/'
Creating jdk server jimage
Creating jdk jimage
Creating jre jimage
duplicate resource "META-INF/services/sun.management.spi.PlatformMBeanProvider", skipping duplicate resource "META-INF/services/sun.management.spi.PlatformMBeanProvider", skipping duplicate resource "META-INF/services/sun.management.spi.PlatformMBeanProvider", skipping
Unzipping jdk/src/closed/db/db-derby-10.10.2.0-bin.zip
duplicate resource "META-INF/services/com.sun.jdi.connect.Connector", skipping
Unzipping jdk/src/closed/db/db-derby-10.10.2.0-bin.zip
Updating images/sec-bin.zip
## Starting verify-modules
Checking dependencies across JDK modules
Access verification succeeded.
## Finished verify-modules (build time 00:00:16)

Is there any way to make this faster?

I used to have a script that compiles the exact set of .java files that I touched, and patch rt.jar. It would complete the build in a second or so. I guess I could update the script to work with modules and jimage, but would be happier if I didn't have to.

Thanks
- Ioi


Note that if you put the *-only target on the same make command line, the results will be unpredictable as -only deactivates dependencies, so images would start running before java.base was properly done.

A note on sjavac, I do believe it currently works (to some extent) in jdk9.

/Erik


Reply via email to