-
Enhancement
-
Resolution: Unresolved
-
P4
-
9, 10, 11, 12, 13, 14, 15
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 inJDK-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.
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
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.
- relates to
-
JDK-8241556 Memory leak if -XX:CompileCommand is set
- Closed
-
JDK-8057169 Improve CompilerOracle matchers search
- Open
-
JDK-8046155 JEP 165: Compiler Control
- Closed