hotspot/src/share/vm/compiler/compilerDirectives.cpp
changeset 35131 d231aa9f57ba
parent 35130 223598d44a8b
child 35141 3cddc2b46986
equal deleted inserted replaced
35130:223598d44a8b 35131:d231aa9f57ba
   311   return _directive;
   311   return _directive;
   312 }
   312 }
   313 
   313 
   314 bool DirectiveSet::matches_inline(methodHandle method, int inline_action) {
   314 bool DirectiveSet::matches_inline(methodHandle method, int inline_action) {
   315   if (_inlinematchers != NULL) {
   315   if (_inlinematchers != NULL) {
   316     if (_inlinematchers->match(method, InlineMatcher::force_inline)) {
   316     if (_inlinematchers->match(method, inline_action)) {
   317       return true;
   317       return true;
   318     }
   318     }
   319   }
   319   }
   320   return false;
   320   return false;
   321 }
   321 }
   323 bool DirectiveSet::should_inline(ciMethod* inlinee) {
   323 bool DirectiveSet::should_inline(ciMethod* inlinee) {
   324   inlinee->check_is_loaded();
   324   inlinee->check_is_loaded();
   325   VM_ENTRY_MARK;
   325   VM_ENTRY_MARK;
   326   methodHandle mh(THREAD, inlinee->get_Method());
   326   methodHandle mh(THREAD, inlinee->get_Method());
   327 
   327 
   328   if (matches_inline(mh, InlineMatcher::force_inline)) {
   328   if (_inlinematchers != NULL) {
   329     return true;
   329     return matches_inline(mh, InlineMatcher::force_inline);
   330   }
   330   }
   331   if (!CompilerDirectivesIgnoreCompileCommandsOption && CompilerOracle::should_inline(mh)) {
   331   if (!CompilerDirectivesIgnoreCompileCommandsOption) {
   332     return true;
   332     return CompilerOracle::should_inline(mh);
   333   }
   333   }
   334   return false;
   334   return false;
   335 }
   335 }
   336 
   336 
   337 bool DirectiveSet::should_not_inline(ciMethod* inlinee) {
   337 bool DirectiveSet::should_not_inline(ciMethod* inlinee) {
   338   inlinee->check_is_loaded();
   338   inlinee->check_is_loaded();
   339   VM_ENTRY_MARK;
   339   VM_ENTRY_MARK;
   340   methodHandle mh(THREAD, inlinee->get_Method());
   340   methodHandle mh(THREAD, inlinee->get_Method());
   341 
   341 
   342   if (matches_inline(mh, InlineMatcher::dont_inline)) {
   342   if (_inlinematchers != NULL) {
   343     return true;
   343     return matches_inline(mh, InlineMatcher::dont_inline);
   344   }
   344   }
   345   if (!CompilerDirectivesIgnoreCompileCommandsOption && CompilerOracle::should_not_inline(mh)) {
   345   if (!CompilerDirectivesIgnoreCompileCommandsOption) {
   346     return true;
   346     return CompilerOracle::should_not_inline(mh);
   347   }
   347   }
   348   return false;
   348   return false;
   349 }
   349 }
   350 
   350 
   351 bool DirectiveSet::parse_and_add_inline(char* str, const char*& error_msg) {
   351 bool DirectiveSet::parse_and_add_inline(char* str, const char*& error_msg) {