RFR: 8275586: Zero: Simplify interpreter initialization
Aleksey Shipilev
shade at openjdk.java.net
Wed Nov 3 10:17:33 UTC 2021
On Wed, 3 Nov 2021 10:12:19 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> The prolog in `BytecodeInterpreter` is hairy due to early initialization of interpreter statics. Previous rewrites make it mostly redundant, and we can now simplify it.
>>
>> This also implicitly fixes a initialization bug. If `JvmtiExport::can_post_interpreter_events()` changes at runtime, we will call into the uninitialized version:
>>
>>
>> // Call the interpreter
>> if (JvmtiExport::can_post_interpreter_events()) {
>> BytecodeInterpreter::run<true>(istate);
>> } else {
>> BytecodeInterpreter::run<false>(istate);
>> }
>>
>>
>> Additional testing:
>> - [x] Linux x86_64 fastdebug `make bootcycle-images`
>
> src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 417:
>
>> 415: #define THREAD istate->thread()
>> 416: #endif
>> 417:
>
> This is a weirdly-hacky optimization, and is perhaps obsolete on modern compilers. While simplifying, I'd take it out.
I remember following up on this whole `LOTS_OF_REGS` mess, and it seems still profitable. I can take a look in a separate RFE, OK?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6029
More information about the hotspot-dev
mailing list