8144091: CompilerControl: directive file doesn't override inlining rules
authorneliasso
Wed, 09 Dec 2015 13:37:59 +0100
changeset 35131 d231aa9f57ba
parent 35130 223598d44a8b
child 35132 07bc696c7fdb
child 35133 4e23fa46d48d
8144091: CompilerControl: directive file doesn't override inlining rules Summary: Fix correct overrides Reviewed-by: roland
hotspot/src/share/vm/compiler/compilerDirectives.cpp
--- a/hotspot/src/share/vm/compiler/compilerDirectives.cpp	Wed Dec 16 15:39:11 2015 +0100
+++ b/hotspot/src/share/vm/compiler/compilerDirectives.cpp	Wed Dec 09 13:37:59 2015 +0100
@@ -313,7 +313,7 @@
 
 bool DirectiveSet::matches_inline(methodHandle method, int inline_action) {
   if (_inlinematchers != NULL) {
-    if (_inlinematchers->match(method, InlineMatcher::force_inline)) {
+    if (_inlinematchers->match(method, inline_action)) {
       return true;
     }
   }
@@ -325,11 +325,11 @@
   VM_ENTRY_MARK;
   methodHandle mh(THREAD, inlinee->get_Method());
 
-  if (matches_inline(mh, InlineMatcher::force_inline)) {
-    return true;
+  if (_inlinematchers != NULL) {
+    return matches_inline(mh, InlineMatcher::force_inline);
   }
-  if (!CompilerDirectivesIgnoreCompileCommandsOption && CompilerOracle::should_inline(mh)) {
-    return true;
+  if (!CompilerDirectivesIgnoreCompileCommandsOption) {
+    return CompilerOracle::should_inline(mh);
   }
   return false;
 }
@@ -339,11 +339,11 @@
   VM_ENTRY_MARK;
   methodHandle mh(THREAD, inlinee->get_Method());
 
-  if (matches_inline(mh, InlineMatcher::dont_inline)) {
-    return true;
+  if (_inlinematchers != NULL) {
+    return matches_inline(mh, InlineMatcher::dont_inline);
   }
-  if (!CompilerDirectivesIgnoreCompileCommandsOption && CompilerOracle::should_not_inline(mh)) {
-    return true;
+  if (!CompilerDirectivesIgnoreCompileCommandsOption) {
+    return CompilerOracle::should_not_inline(mh);
   }
   return false;
 }