RFR: 8008243: Zero: Implement fast bytecodes [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Oct 19 13:27:54 UTC 2021
On Tue, 19 Oct 2021 10:00:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This work improves Zero performance considerably, without complicating the interpreter all that much. This work is based on much earlier patch by @rkennke, then edited by @jerboaa, and finally polished by me here :)
>>
>> SPECjvm benchmarks improve across the board, with lowest improvement on `Derby` (+6%) and largest on `Compress` (+50%). Given that Zero is used to implement the JVM on emerging platforms that are still rather slow themselves, it makes sense to make Zero quantifiably faster. Even 10% improvement means more than 2 hours a day worth of CPU time.
>>
>> Additional testing:
>> - [x] Linux x86_64 Zero fastdebug bootcycle-images
>> - [x] Linux x86_64 Zero fastdebug fuzzer tests (no failures = no new behaviors introduced)
>
> Aleksey Shipilev has updated the pull request incrementally with three additional commits since the last revision:
>
> - Remove shadowing "obj" to fix JVMTI tests
> - Comment _fast_zputfield LSB
> - MAYBE_POST_FIELD_MODIFICATION should check _putstatic
Looks good! We've had this request for so long now so thank you for doing it!
src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 394:
> 392: }
> 393:
> 394: #define MAYBE_POST_FIELD_ACCESS(obj) { \
I wonder if making these functions would reduce the size of the code in the big case statement and improve the compiler's ability to optimize it?
src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 2719:
> 2717:
> 2718: int field_offset = cache->f2_as_index();
> 2719: obj->byte_field_put(field_offset, (STACK_INT(-1) & 1)); // only store LSB
Good!
-------------
Marked as reviewed by coleenp (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1938
More information about the hotspot-runtime-dev
mailing list