[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR(M): 8165896: Use "open" flag from JVM_DefineModule to export all module packages
From:       Rachel Protacio <rachel.protacio () oracle ! com>
Date:       2017-04-24 15:55:47
Message-ID: d945fae4-bc1e-a7b5-27a5-dd18d8085b23 () oracle ! com
[Download RAW message or body]

Thanks, Lois!

Rachel


On 4/24/2017 11:25 AM, Lois Foltan wrote:
> +1
> Lois
>
> On 4/24/2017 10:49 AM, harold seigel wrote:
>> Hi Rachel,
>>
>> These updated changes look good.
>>
>> Thanks! Harold
>>
>>
>> On 4/21/2017 10:05 AM, Rachel Protacio wrote:
>>> Hi,
>>>
>>> The jlrM changes have synched into jdk10 and there were a few 
>>> discrepancies from my earlier changesets, so these are slightly 
>>> updated webrevs. (I also found an extra spot in the jdk repo that 
>>> needed deleting.)
>>>
>>> Re-tested with JPRT and RBT tiers 2-5.
>>>
>>> hotspot webrev: http://cr.openjdk.java.net/~rprotacio/8165896.01/
>>> jdk webrev: http://cr.openjdk.java.net/~rprotacio/8165896.jdk.01/
>>> root repo patch:
>>>
>>> diff --git a/test/lib/sun/hotspot/WhiteBox.java 
>>> b/test/lib/sun/hotspot/WhiteBox.java
>>> --- a/test/lib/sun/hotspot/WhiteBox.java
>>> +++ b/test/lib/sun/hotspot/WhiteBox.java
>>> @@ -482,8 +482,8 @@
>>>    }
>>>
>>>    // Jigsaw
>>> -  public native void DefineModule(Object module, String version, 
>>> String location,
>>> -                                  Object[] packages);
>>> +  public native void DefineModule(Object module, boolean is_open, 
>>> String version,
>>> +                                  String location, Object[] packages);
>>>    public native void AddModuleExports(Object from_module, String 
>>> pkg, Object to_module);
>>>    public native void AddReadsModule(Object from_module, Object 
>>> source_module);
>>>    public native void AddModulePackage(Object module, String pkg)
>>>
>>> Thank you!
>>> Rachel
>>>
>>> On 3/23/2017 2:23 PM, Rachel Protacio wrote:
>>>> Hello!
>>>>
>>>> Please review this enhancement, which implements the VM side of 
>>>> open modules. Open modules export all their packages unqualifiedly, 
>>>> which was previously done by exporting the packages one by one on 
>>>> the java side. This change saves that step by adding an internal 
>>>> "open" representation for the module structure, which is checked 
>>>> before checking the exportedness of the package itself.
>>>>
>>>> JDK link: https://bugs.openjdk.java.net/browse/JDK-8165896
>>>>
>>>> hotspot webrev: 
>>>> http://cr.openjdk.java.net/~rprotacio/8165896.hotspot.00/
>>>> jdk webrev: http://cr.openjdk.java.net/~rprotacio/8165896.jdk.00/
>>>> root repo patch:
>>>> --- old/test/lib/sun/hotspot/WhiteBox.java    2017-03-23 
>>>> 12:50:36.869963040 -0400
>>>> +++ new/test/lib/sun/hotspot/WhiteBox.java    2017-03-23 
>>>> 12:50:36.421963021 -0400
>>>> @@ -1,5 +1,5 @@
>>>>   /*
>>>> - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All 
>>>> rights reserved.
>>>> + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All 
>>>> rights reserved.
>>>>    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>>>>    *
>>>>    * This code is free software; you can redistribute it and/or 
>>>> modify it
>>>> @@ -449,8 +449,8 @@
>>>>     }
>>>>       // Jigsaw
>>>> -  public native void DefineModule(Object module, String version, 
>>>> String location,
>>>> -                                  Object[] packages);
>>>> +  public native void DefineModule(Object module, boolean is_open, 
>>>> String version,
>>>> +                                  String location, Object[] 
>>>> packages);
>>>>     public native void AddModuleExports(Object from_module, String 
>>>> pkg, Object to_module);
>>>>     public native void AddReadsModule(Object from_module, Object 
>>>> source_module);
>>>>     public native void AddModulePackage(Object module, String pkg);
>>>>
>>>> Testing:
>>>>
>>>>   * includes new regression test
>>>>   * JPRT and RBT hotspot tiers 2-5
>>>>
>>>> Notes:
>>>>
>>>>   * This changeset re-conceptualizes the unnamed module as an open
>>>>     module (as far as the internal representation is concerned). This
>>>>     saves the VM from specifying every package in the unnamed module
>>>>     as unqualifiedly exported.
>>>>   * Additionally, automatic modules are defined as open modules in
>>>>     terms of package exports. As such, in the jdk repo's Module.java
>>>>     code, defineModule0() is called with isOpen==true for automatic
>>>>     modules.
>>>>   * In my search through module startup code, I found a for-loop in
>>>>     modules.cpp that was looping through java.base packages just for
>>>>     some logging. The entire loop should have been bounded by a
>>>>     log_is_enabled() conditional. Since this patch is generally
>>>>     improving the efficiency of modules startup, I corrected that 
>>>> here.
>>>>   * Fixed a few comment typos I found along the way.
>>>>
>>>> Thank you!
>>>> Rachel
>>>
>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic