RFR(L): JEP165: Compiler Control

Roland Westrelin roland.westrelin at oracle.com
Wed Sep 23 08:14:19 UTC 2015

> Hotspot webrev: http://cr.openjdk.java.net/~neliasso/8046155/webrev.01/


 210   /*CompilerDirectives* _default_directives = new CompilerDirectives();
 211   char str[] = "*.*";
 212   const char* error_msg = NULL;
 213   _default_directives->add_match(str, error_msg);
 214   assert(error_msg == NULL, "Must succeed.");
 215   CompileBroker::dirstack()->push(_default_directives);*/

should go away.


Why do you make those changes? They are breaking tiered compilation AFAICT.


What does that do?

1163   // Breaking the abstraction - directives are only used inside a compilation otherwise.
1164   DirectiveSet* dirset = dirstack()->getMatchingDirective(method, comp_level);
1165   bool excluded = !dirset->EnabledOption;
1166   {
1167     MutexLockerEx locker(DirectivesStack_lock, Mutex::_no_safepoint_check_flag);
1168     dirset->directive()->dec_refcount();
1169   }


 371   // ciEnv for retrieving flags
 372   ciEnv* _ciEnv;

Where are you using that one? There’s usually a reference to Compile around and that’s how we get to the ciEnv.


 150   diagnostic(bool, PrintOptoAssembly, false,                                \
 151           "Print New compiler assembly output")                             \

 591   diagnostic(bool, TraceSpilling, false,                                    \
 592           "Trace spilling")                                                 \

Why are those needed? It doesn’t feel right that you have to change the scope of an option for that change.


Why that change?


508     if (Thread::current()->is_Compiler_thread()) {

native methods are not generated by a compiler thread so that wouldn’t work.

In general, where are command line options (like PrintInlining for instance) recorded with that framework so their value can later be queried:

if (!compilation()->env()->dirset()->PrintInliningOption) {



More information about the hotspot-compiler-dev mailing list