RFR(S) 8193332 MetaspaceShared::check_shared_class_loader_type is not used during archive creation
Lois Foltan
lois.foltan at oracle.com
Mon May 21 17:19:54 UTC 2018
On 5/21/2018 12:55 PM, Ioi Lam wrote:
>
>
> On 5/21/18 7:03 AM, Lois Foltan wrote:
>> On 5/17/2018 9:13 PM, Ioi Lam wrote:
>>
>>> https://bugs.openjdk.java.net/browse/JDK-8193332
>>> http://cr.openjdk.java.net/~iklam/jdk11/8193332-check_shared_class_loader_type.v01/
>>>
>>>
>>> Summary:
>>>
>>> When we restructured the AppCDS code, the call to
>>> MetaspaceShared::check_shared_class_loader_type
>>> was somehow left out. I have restored it, and actually found a minor
>>> bug related to modules
>>> and -Xbootclasspath/a:
>>>
>>> In classLoader.cpp, at dump time we used to load a class from
>>> -Xbootclasspath/a even if
>>> this class belongs to a named packaged, which means it would not be
>>> loaded by the JVM at runtime.
>>> Such dump-time loading seems unnecessary so I removed it, and fixed
>>> a related test case
>>> to reflect the latest behavior.
>>>
>>> Tested with hs-tier1,2.
>>>
>>> Thanks
>>> - Ioi
>> Looks good. Can you either remove or improve upon the
>> DumpSharedSpaces comment in lines 1413-1424 of classLoader.cpp to
>> reflect the changed behavior?
>> Thanks,
>> Lois
>>
> Hi Lois,
>
> Thanks for the review. I've changed the comments from:
>
> // If DumpSharedSpaces is true boot loader visibility boundaries are
> set to:
> // - [jimage] + [_first_append_entry to _last_append_entry] (all
> path entries).
> //
> // If search_append_only is true, boot loader visibility boundaries are
> // set to be _first_append_entry to the end. This includes:
> // [-Xbootclasspath/a]; [jvmti appended entries]
> //
> // If both DumpSharedSpaces and search_append_only are false, boot
> loader
> // visibility boundaries are set to be the --patch-module entries
> plus the base piece.
> // This would include:
> // [--patch-module=<module>=<file>(<pathsep><file>)*]; [jimage |
> exploded module build]
>
> to
>
> // If search_append_only is true, boot loader visibility boundaries are
> // set to be _first_append_entry to the end. This includes:
> // [-Xbootclasspath/a]; [jvmti appended entries]
> //
> // If search_append_only is false, boot loader visibility boundaries
> are
> // set to be the --patch-module entries plus the base piece. This
> includes:
> // [--patch-module=<module>=<file>(<pathsep><file>)*]; [jimage |
> exploded module build]
>
> Thanks
> - Ioi
>
Looks good, thanks!
Lois
More information about the hotspot-runtime-dev
mailing list