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

avoid calling DirectiveSet::clone(this) in compilecommand_compatibility_init

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 16
    • 15
    • hotspot
    • b09
    • generic
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: