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

Avoid cloning DirectiveSet at runtime if -XX:CompileCommand is set

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9, 10, 11, 12, 13, 14, 15
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Subcomponent:
    • Introduced In Version:
      9

      Description

      Currently the handling for -XX:CompileCommand is not efficient:
      DirectiveSet::compilecommand_compatibility_init() clones the current instance of DirectiveSet, checks and modifies with existing options in CompilerOracle, then returns the new instance, or frees up the new instance and returns the current instance. This happens every time the JIT compiles a method. This cloning mechanism also partly caused the memory leak in JDK-8241556.

      It should be possible to convert all CompileCommand options into equivalent DirectiveSet objects during startup, so it can avoid the cost of allocation, deallocation, and some comparison work at runtime.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                manc Man Cao
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: