RFR 8197954 Remove unnecessary intermediary APIs from AppCDS implementation
Ioi Lam
ioi.lam at oracle.com
Thu May 3 04:46:03 UTC 2018
On 5/2/18 3:38 PM, Calvin Cheung wrote:
> Hi Ioi,
>
> The changes look good. I have the following minor comments:
>
> 1) classLoaderExt.hpp
>
> 32 class ClassListParser;
>
I removed the CDS_ONLY() macro to make the code cleaner. The class
declaration doesn't have any significant cost in compilation and no cost
in the binary, so I think it's better to avoid unnecessary CDS_ONLY macros.
> The above can remain as CDS_ONLY.
> It is needed for
> 113 static Klass* load_one_class(ClassListParser* parser, TRAPS);
>
> The above function should be CDS_ONLY as it is called via the
> MetaspaceShared::preload_and_dump() code path.
>
> 2) sharedPathsMiscInfo.hpp
>
> 124 enum {
> 125 BOOT = 1,
> 126 NON_EXIST = 2,
> 127 APP = 5,
> 128 MODULE = 6
> 129 };
>
> How about set APP to 3 and MODULE to 4?
>
Yes, I will do that.
Thanks
- Ioi
> thanks,
> Calvin
>
> On 5/1/18, 10:17 PM, Ioi Lam wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8197954
>> http://cr.openjdk.java.net/~iklam/jdk11/8197954-remove-unnecessary-appcds-api.v01/
>>
>>
>> Summary:
>>
>> Before AppCDS was open sourced, we had a few "Ext" classes in
>> sharedClassUtil.hpp
>> that abstracted away the CDS operations related to the non-boot class
>> loaders.
>> This API made it possible to build the Oracle JDK with AppCDS
>> included, or build
>> the Open JDK with AppCDS removed.
>>
>> With the open sourcing of AppCDS, this abstraction layer is no longer
>> necessary. I
>> have moved the contents of the "Ext" classes into their proper
>> locations and removed
>> the sharedClassUtil.hpp/cpp files.
>>
>> Most of the changes are just moving things around. There shouldn't be
>> behavioral
>> changes.
>>
>> The files classLoaderExt.hpp/cpp still exists -- it encapsulates the
>> classpath
>> management code and is not strictly unnecessary. Some clean up may be
>> needed there, but
>> I'll probably do that in a separate RFE.
>>
>> Testing with hotspot tiers1~4.
>>
>> Thanks
>> - Ioi
>>
>>
More information about the hotspot-runtime-dev
mailing list