RFR: 8340710: Optimize DirectClassBuilder::build [v2]

Shaojin Wen swen at openjdk.org
Tue Sep 24 16:04:52 UTC 2024


> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
> 
> 1. DirectClassBuilder::build codeSize 361 -> 319
> 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)

Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits:

 - Merge remote-tracking branch 'upstream/master' into optim_classfile_build_202409
   
   # Conflicts:
   #	src/java.base/share/classes/jdk/internal/classfile/impl/Util.java
 - suggestion from @liach
 - 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=01
  Stats: 50 lines in 4 files changed: 31 ins; 4 del; 15 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