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

avoid calling DirectiveSet::clone(this) in compilecommand_compatibility_init

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 15
    • hotspot
    • b09
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: