RFR: 8262424: Change multiple get_java_xxx() functions in thread.cpp into one function
Ioi Lam
iklam at openjdk.java.net
Fri Feb 26 17:08:42 UTC 2021
On Fri, 26 Feb 2021 15:57:36 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Please review this small fix to change the multiple get_java_xxx() functions in thread.cpp into a single function.
>>
>> The fix was tested with Mach5 tiers 1 and 2 on Linux, Mac OS, and Windows, and tiers 3-5 on Linux x64.
>>
>> Thanks, Harold
>
> src/hotspot/share/runtime/thread.cpp line 907:
>
>> 905: // Extract version and vendor specific information.
>> 906: static const char* get_java_version_info(InstanceKlass* ik,
>> 907: Symbol* field_name,
>
> Instead of Symbol* field name, can you pass const char * and use
> TempNewSymbol field_name = StringTable::new_symbol(name);
> and then these can be removed from vmSymbols.hpp also?
I think it's better to keep these inside vmSymbols. That way they will be stored inside the CDS archive, and you don't need to create them at runtime. This will save a tiny bit of startup time.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2750
More information about the hotspot-runtime-dev
mailing list