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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Jiangli Zhou
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
Reply | Threaded
Open this post in threaded view
|

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

Ioi Lam
Hi Jiangli,

This change looks good to me. Thanks!

- Ioi


On 11/1/17 12: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

Reply | Threaded
Open this post in threaded view
|

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

Jiangli Zhou
Thanks, Ioi!

Jiangli

> On Nov 3, 2017, at 10:11 AM, Ioi Lam <[hidden email]> wrote:
>
> Hi Jiangli,
>
> This change looks good to me. Thanks!
>
> - Ioi
>
>
> On 11/1/17 12: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
>

Reply | Threaded
Open this post in threaded view
|

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

coleen.phillimore
In reply to this post by Jiangli Zhou

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

Reply | Threaded
Open this post in threaded view
|

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

Jiangli Zhou
Thanks, Coleen!

Jiangli

> On Nov 3, 2017, at 10:34 AM, [hidden email] 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
>