Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5277 [startup][performance] general optimizations
  3. HARMONY-5356

[drlvm][startup][performance] Delayed recompilation implementation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • DRLVM
    • None
    • Patch Available
    • Moderate

    Description

      Now, client JIT chains look like this:

      chains=chain1,chain2
      chain1.jits=JET_CLINIT
      chain2.jits=JET_DPGO,CD_OPT

      chain1.filter=+::<clinit>
      chain1.filter=-

      JET_CLINIT.file=jitrino
      JET_DPGO.file=jitrino
      CD_OPT.file=jitrino

      JET_DPGO.genProfile=EB_PROF
      EB_PROF.profilerType=EB_PROFILER
      CD_OPT.useProfile=EB_PROF

      So, all methods (except class initializers) are passing through JET_DPGO with EB_PROF attached and then will be recompiled by CD_OPT. One should note that this will cause concurrency between on-going recompilation and first-time JET compilation. So, if first-time JET compilation speed is important for startup, then we should separate these two processes in time. That is, let's compile all in the bunch with JET and only then start to recompile with OPT.

      That is, we can either:
      a. Set the thresholds for EB_PROF such as recompilation would held later
      b. Introduce new step (e.g. JET_QUICK) which would compile really fast (even without profile) and wait before inducing recompilation.

      Current architecture of Jitrino requires some profiler to do the notification for traversing the JITs chain, so attached patch introduces dummy DELAY_PROFILER which simply waits desired time.

      So, we will have:

      chains=chain1,chain2
      chain1.jits=JET_CLINIT
      chain2.jits=JET_QUICK,JET_DPGO,CD_OPT

      chain1.filter=+::<clinit>
      chain1.filter=-

      JET_CLINIT.file=jitrino
      JET_QUICK.file=jitrino
      JET_DPGO.file=jitrino
      CD_OPT.file=jitrino

      JET_DPGO.genProfile=EB_PROF
      EB_PROF.profilerType=EB_PROFILER
      CD_OPT.useProfile=EB_PROF

      JET_QUICK.genProfile=DL_PROF
      DL_PROF.profilerType=DL_PROFILER
      DL_PROF.initialTimeout=0
      DL_PROF.delayTimeout=100

      Attachments

        1. vm-delayprofiler-2.patch
          17 kB
          Aleksey Shipilev
        2. vm-delayprofiler-1.patch
          17 kB
          Aleksey Shipilev

        Activity

          People

            xiao-feng li Xiao-Feng Li
            aleksey.shipilev Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: