Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231349

Lazy stub generation

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11, 12, 13, 14, 19
    • Fix Version/s: tbd
    • Component/s: hotspot

      Description

      During the JVM bootstrap we go through StubGenerator::generate_all() to generate a number of specialized routines. Many are used by interpreter and compiled code alike. As we add more such specialized routines, we incur a bootstrap cost, as evidenced by JDK-8270323

      During C2 initialization, we also spend ~10 ms in a single thread generating stubs, most of which are not used early on. This happens in OptoRuntime::generate, generating 14 different stubs. By making this initialization happen on-demand, we would see less CPU spent early on things that might not be used, and we could see useful C2 compilations happen sooner, both of which could be beneficial to startup time.

      Both cases could benefit from a lazy initialization scheme where uninitialized stubs are generated on demand.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kvn Vladimir Kozlov
              Reporter:
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated: