--- old/src/share/vm/compiler/compilerOracle.cpp 2015-09-22 16:26:53.133641894 +0200 +++ new/src/share/vm/compiler/compilerOracle.cpp 2015-09-22 16:26:53.025641897 +0200 @@ -106,6 +106,7 @@ static BasicMatcher* lists[OracleCommandCount] = { 0, }; static TypedMethodOptionMatcher* option_list = NULL; +static bool any_set = false; class TypedMethodOptionMatcher : public MethodMatcher { private: @@ -292,6 +293,7 @@ matcher->init(option, get_type_for(), option_list); matcher->set_value(value); option_list = matcher; + any_set = true; return; } @@ -308,7 +310,9 @@ } bm->set_next(lists[command]); lists[command] = bm; - + if ((command != DontInlineCommand) && (command != InlineCommand)) { + any_set = true; + } return; } @@ -324,6 +328,10 @@ return false; } +bool CompilerOracle::has_any_option() { + return any_set; +} + // Explicit instantiation for all OptionTypes supported. template bool CompilerOracle::has_option_value(methodHandle method, const char* option, intx& value); template bool CompilerOracle::has_option_value(methodHandle method, const char* option, uintx& value); @@ -337,15 +345,10 @@ return value; } -bool CompilerOracle::should_exclude(methodHandle method, bool& quietly) { - quietly = true; - if (lists[ExcludeCommand] != NULL) { - if (lists[ExcludeCommand]->match(method)) { - quietly = _quiet; - return true; - } +bool CompilerOracle::should_exclude(methodHandle method) { + if (check_predicate(ExcludeCommand, method)) { + return true; } - if (lists[CompileOnlyCommand] != NULL) { return !lists[CompileOnlyCommand]->match(method); } @@ -356,8 +359,6 @@ return (check_predicate(InlineCommand, method)); } -// Check both DontInlineCommand and ExcludeCommand here -// - consistent behavior for all compilers bool CompilerOracle::should_not_inline(methodHandle method) { return check_predicate(DontInlineCommand, method) || check_predicate(ExcludeCommand, method); }