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

Move intrinsic stubs generation to compiler runtime initialization code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 11, 12, 13, 14, 19
    • hotspot
    • b16

      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.

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

              Created:
              Updated:
              Resolved: