RFR: 8255762: Shenandoah: Consolidate/streamline interpreter LRBs
Roman Kennke
rkennke at openjdk.java.net
Mon Nov 2 22:52:04 UTC 2020
We currently have two LRB implementations in interpreter: one normal and one for native/weak LRB. We should consolidate them into one.
The main issue here is that the two implementations follow different approaches:
- the normal LRB calls through the shenandoah_lrb stub which does additional null- and cset-checking
- the weak LRB calls to runtime directly and must not do cset-checking
The reason for calling through the stub is that it gives more freedom to allocate two registers that are required for the cset check. However, we can invert the cset addressing like we did in JDK-8245465 and save a register. We can also eliminate the null-check and let the cset-check subsume it (like we do everywhere else). Allocating a single register for the cset-check is easy, and we can do so in-line without the extra jump through the stub. The runtime call through the stub has also been very costly: it dumps 2KB of register data on the stack at each call, that is very excessive. save_xmm_registers() should be more than enough (in-fact, I am almost certain that this is excessive too, and we should only need to save/restore xmm0 - but not in this patch). Not needing to generate the call-stub is also helpful for backportability, because in jdk8-shenandoah we cannot do that.
Testing: hotspot_gc_shenandoah (x86_64, x86_32)
-------------
Commit messages:
- Improve register shuffling in interpreter LRB/aarch64
- Consolidate/streamline interpreter LRBs/aarch64 part
- Fix x86_32 build
- 8255762: Shenandoah: Consolidate/streamline interpreter LRBs
Changes: https://git.openjdk.java.net/jdk/pull/1010/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1010&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8255762
Stats: 424 lines in 4 files changed: 45 ins; 312 del; 67 mod
Patch: https://git.openjdk.java.net/jdk/pull/1010.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1010/head:pull/1010
PR: https://git.openjdk.java.net/jdk/pull/1010
More information about the shenandoah-dev
mailing list