Reduce size of j.t.f.DateTimePrintContext::adjust

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: None
    • Component/s: core-libs
    • b13

      By adding the JVM startup parameters -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining and analyzing the printed log information, and found that the code size of the j.t.f.DateTimePrintContext::adjust method is 382, which is greater than 325, causing inlining failure.

      ```
      @ 7 java.time.format.DateTimePrintContext::adjust (382 bytes) failed to inline: hot method too big
      ```

      By splitting the code into common/uncommon, and moving the uncommon code into adjust0, the adjust method is kept small and can be inlined by the C2 optimizer.

            Assignee:
            Shaojin Wen
            Reporter:
            Shaojin Wen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: