On 1/5/2017 11:47 AM, Claes Redestad wrote:
Hi,

after a round of review comments I've now reworked this to do the
transformations in the JNI layer rather than inside the VM, with
similar - if not better - results.

Webrevs:
http://cr.openjdk.java.net/~redestad/8171855/hotspot.03/
http://cr.openjdk.java.net/~redestad/8171855/jdk.03/

Testing: RBT run in progress, all runtime/modules tests pass locally

Hi Claes,

Thank you for reworking this. I think it looks good. A couple of comments in hotspot/src/share/vm/classfile/modules.cpp

modules.cpp/Modules::define_module()
line #278, I think it is important for the VM to validate the packages and num_packages parameters.
    An IllegalArgumentException should be thrown if:
    - num_packages is not >= 0
    - if packages == NULL, then num_packages should be equal to 0,
this will protect against erroneously entering the for loop at line #292 based solely on num_packages line #291 - Ideally, if num_packages is 0, there is no sense in allocating pkg_list

Thanks,
Lois


Thanks!

/Claes

On 01/02/2017 07:27 PM, Claes Redestad wrote:
Hi,

during jigsaw bootstrap, package names - represented in external form,
"java.lang" - are transformed into VM internal form, "java/lang",
before calling into the VM.

This, however, can effectively be moved into the VM, which removes the
need to generate a lot of short-lived strings during bootstrap and heat
up various String.replace-related methods.  This has a noticeable impact
on startup metrics.

Bug: https://bugs.openjdk.java.net/browse/JDK-8171855



Reply via email to