RFR: 8340710: Optimize DirectClassBuilder::build
Shaojin Wen
swen at openjdk.org
Tue Sep 24 01:15:15 UTC 2024
Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
1. DirectClassBuilder::build codeSize 361 -> 315
2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
3. BufWriterImpl::writeIndex codeSize 62 -> 37 (forceinline)
4. BufWriterImpl::writeU2 (forceinline)
5. Util::writeAttributes codSize 45 -> 40 (forceinline)
6. Util::writeList codSize 47 -> 42 (forceinline)
-------------
Commit messages:
- inline writeLong & local constantPool
- fix write header
- suggestion from @liach
- force inline Util::writeAttributes & Util::writeList
- force inline writeU2
- force inline invalidIndex
- optimize for writeExceptionHandlers for C1
- optimize DirectClassBuilder::build
Changes: https://git.openjdk.org/jdk/pull/21118/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21118&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8340710
Stats: 50 lines in 4 files changed: 31 ins; 6 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/21118.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21118/head:pull/21118
PR: https://git.openjdk.org/jdk/pull/21118
More information about the core-libs-dev
mailing list