RFR: 8184206: Resolve all string constants in shared classes at CDS dump time

Jiangli Zhou jiangli.zhou at oracle.com
Fri Nov 3 17:36:27 UTC 2017


Thanks, Coleen!

Jiangli

> On Nov 3, 2017, at 10:34 AM, coleen.phillimore at oracle.com wrote:
> 
> 
> Jiangli,
> 
> This looks good!  It's very nice that it worked out to be so simple and consistent with what we'd expect.
> 
> thanks,
> Coleen
> 
> On 11/1/17 3:28 PM, Jiangli Zhou wrote:
>> Hi,
>> 
>> Please review the following change for 8184206.
>> 
>> webrev: http://cr.openjdk.java.net/~jiangli/8184206/webrev.00/ <http://cr.openjdk.java.net/~jiangli/8184206/webrev.00/>
>> RFE: https://bugs.openjdk.java.net/browse/JDK-8184206?filter=14921
>> 
>> Before the change, constant pool string entries in shared classes were only resolved to existing interned strings at CDS dump time. The string constants remained as unresolved if the strings were not yet interned.
>> 
>> The change in the above webrev resolves all string constants (excluding pseudo strings) for shared classes. For any strings that are not yet interned, java.lang.String instances are created and added to the string tabled when the string constants are resolved. All string instances referenced from the string table are archived.
>> 
>> Resolving all string constants provides better support for AOT and CDS integration. It also improves CDS/AppCDS usability by removing the needs for profiling target applications to create a string list for archiving.
>> 
>> The change results more string objects being created and archived at CDS dump time. Measurement on linux-x64 using the default class list shows there is about 1.7% size increase for the CDS archive with all strings resolved. The increase of the generated archive size is minimal comparing to the benefits listed above.
>> 
>> Tested with tier1, tier2, and tier3 tests.
>> 
>> Thanks,
>> Jiangli
> 



More information about the hotspot-runtime-dev mailing list