RFR: 8267870: Remove unnecessary char_converter during class loading [v3]
David Holmes
dholmes at openjdk.java.net
Wed Jun 16 02:28:34 UTC 2021
On Tue, 15 Jun 2021 14:51:32 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/javaAssertions.cpp line 139:
>>
>>> 137: for (index = len - 1; p != 0; p = p->next(), --index) {
>>> 138: assert(index >= 0, "length does not match list");
>>> 139: TempNewSymbol name = SymbolTable::new_symbol(p->name());
>>
>> Why do we need a temp symbol?
>
> Because the new_symbol call will increment the Symbol* refcount in the SymbolTable, it's then copied to the java.lang.String, so the name isn't needed after this.
Ah I see. The types were confusing me. We start with a char* convert to a Symbol, then convert that back to char* but with the externalized format. The irony there being that it seems these Options start in external format but then get stored in internal format!
No issue.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4173
More information about the hotspot-runtime-dev
mailing list