RFR: 8267870: Remove unnecessary char_converter during class loading [v2]

Ioi Lam iklam at openjdk.java.net
Wed Jun 16 01:15:31 UTC 2021


On Wed, 16 Jun 2021 00:52:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> We create a String object from a Symbol, then swap the '/' for '.' characters, and create another String object.  Seems wasteful.  Removed java_lang_String::char_converted and made externalize_classname take a Symbol.
>> 
>> Tested with tier1-3 in mach5.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Changed name of parameter, some nearby indentation.

Looks good to me. I check the code paths and they seem to be equivalent to the existing code. A small nit with CHECK_NULL.

src/hotspot/share/classfile/systemDictionary.cpp line 1313:

> 1311: 
> 1312:     // Translate to external class name format, i.e., convert '/' chars to '.'
> 1313:     Handle string = java_lang_String::externalize_classname(class_name, THREAD);

Should this be CHECK_NULL?

-------------

Marked as reviewed by iklam (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4173


More information about the hotspot-runtime-dev mailing list