On Thu, 27 Jun 2024 11:14:30 GMT, Shaojin Wen <d...@openjdk.org> wrote:
> Currently, the java.util.Formatter$Conversion::isValid method is implemented > based on switch, which cannot be inlined because codeSize > 325. This problem > can be avoided by implementing it with ImmutableBitSetPredicate. > > use `-XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining` to see the master > branch: > > @ 109 java.util.Formatter$Conversion::isValid (358 bytes) failed to > inline: hot method too big > > > current version > > @ 109 java.util.Formatter$Conversion::isValid (10 bytes) inline (hot) > @ 4 > jdk.internal.util.ImmutableBitSetPredicate$SmallImmutableBitSetPredicate::test > (50 bytes) inline (hot) This pull request has now been integrated. Changeset: 5d866bf1 Author: Shaojin Wen <shaojin.we...@alibaba-inc.com> Committer: Chen Liang <li...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/5d866bf17d96bd0f0e4545d7eee5912eda2e3a94 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod 8335252: Reduce size of j.u.Formatter.Conversion#isValid Reviewed-by: redestad ------------- PR: https://git.openjdk.org/jdk/pull/19926