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

avoid calling DirectiveSet::clone(this) in compilecommand_compatibility_init

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b09
    • CPU:
      generic
    • OS:
      generic

      Description

      Currently, if any option exists in CompileCommand, DirectiveSet::compilecommand_compatibility_init will clone a DirectiveSet for each method. it's expensive but rarely hit.

      http://hg.openjdk.java.net/jdk/jdk/file/5775a1b1ff5a/src/hotspot/share/compiler/compilerDirectives.cpp#l288

      We should wrap set with a smart pointer and use Copy-on-Write strategy. The directiveSet will be cloned only when the content is about to modify.

        Attachments

          Activity

            People

            Assignee:
            xliu Xin Liu
            Reporter:
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: