RFR: 8284533: Improve InterpreterCodelet data footprint
Aleksey Shipilev
shade at openjdk.java.net
Thu Apr 7 15:11:11 UTC 2022
Current `InterpreterCodelet` lays the fields in inefficient order. Stub generation aligns codelets and their related code at `CodeEntryAlignment` (`CEA`), which means with `CEA=16` we are taking two `CEA` units for `InterpreterCodelet` data. Rearranging the fields a bit improves the interpreter code density a bit, dropping its `sizeof` to 16 and thus taking one `CEA` unit.
It would be even more important as we tune up stub generation to allow smaller alignments for data sections in the stub, but the effect is visible even now on small `CEA`-s. These small `CEA`-s are default on some platforms (ARM, selected x86 configs).
Size instrumentation on x86_64 release bits:
# Before
sizeof: 24
_size: @0
_description: @8
_bytecode: @16
# After
sizeof: 16
_size: @8
_description: @0
_bytecode: @12
Interpreter sizes on x86_64 release bits and `-XX:CodeEntryAlignment=16`:
# Before
code size = 92K bytes
avg codelet size = 347 bytes
# After
code size = 87K bytes
avg codelet size = 331 bytes
Point performance run (SPECjvm2008:serial) on x86_64:
Before: 73.188 ± 0.113 ops/s
After: 74.952 ± 0.356 ops/s
Additional testing:
- [ ] Linux x86_64 fastdebug `tier1`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.java.net/jdk/pull/8147/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8147&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8284533
Stats: 6 lines in 1 file changed: 3 ins; 3 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/8147.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8147/head:pull/8147
PR: https://git.openjdk.java.net/jdk/pull/8147
More information about the hotspot-runtime-dev
mailing list