8191688: Assert failed in > 200 tests: failed dependencies, but counter didn't change
Reviewed-by: kvn
--- a/src/hotspot/share/c1/c1_GraphBuilder.cpp Wed Nov 22 17:10:38 2017 +0100
+++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp Wed Nov 22 09:27:06 2017 -0800
@@ -3441,6 +3441,7 @@
if ( callee->is_native()) return "native method";
if ( callee->is_abstract()) return "abstract method";
if (!callee->can_be_compiled()) return "not compilable (disabled)";
+ if (!callee->can_be_parsed()) return "cannot be parsed";
return NULL;
}
--- a/src/hotspot/share/ci/ciMethod.cpp Wed Nov 22 17:10:38 2017 +0100
+++ b/src/hotspot/share/ci/ciMethod.cpp Wed Nov 22 09:27:06 2017 -0800
@@ -87,6 +87,7 @@
_balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
_is_c1_compilable = !h_m()->is_not_c1_compilable();
_is_c2_compilable = !h_m()->is_not_c2_compilable();
+ _can_be_parsed = true;
_has_reserved_stack_access = h_m()->has_reserved_stack_access();
// Lazy fields, filled in on demand. Require allocation.
_code = NULL;
@@ -99,12 +100,13 @@
#endif // COMPILER2
ciEnv *env = CURRENT_ENV;
- if (env->jvmti_can_hotswap_or_post_breakpoint() && can_be_compiled()) {
+ if (env->jvmti_can_hotswap_or_post_breakpoint()) {
// 6328518 check hotswap conditions under the right lock.
MutexLocker locker(Compile_lock);
if (Dependencies::check_evol_method(h_m()) != NULL) {
_is_c1_compilable = false;
_is_c2_compilable = false;
+ _can_be_parsed = false;
}
} else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
--- a/src/hotspot/share/ci/ciMethod.hpp Wed Nov 22 17:10:38 2017 +0100
+++ b/src/hotspot/share/ci/ciMethod.hpp Wed Nov 22 09:27:06 2017 -0800
@@ -87,6 +87,7 @@
bool _balanced_monitors;
bool _is_c1_compilable;
bool _is_c2_compilable;
+ bool _can_be_parsed;
bool _can_be_statically_bound;
bool _has_reserved_stack_access;
@@ -291,6 +292,7 @@
bool has_option(const char *option);
bool has_option_value(const char* option, double& value);
bool can_be_compiled();
+ bool can_be_parsed() const { return _can_be_parsed; }
bool can_be_osr_compiled(int entry_bci);
void set_not_compilable(const char* reason = NULL);
bool has_compiled_code();
--- a/src/hotspot/share/opto/bytecodeInfo.cpp Wed Nov 22 17:10:38 2017 +0100
+++ b/src/hotspot/share/opto/bytecodeInfo.cpp Wed Nov 22 09:27:06 2017 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -480,6 +480,7 @@
if ( callee->is_abstract()) return "abstract method";
if (!callee->has_balanced_monitors()) return "not compilable (unbalanced monitors)";
if ( callee->get_flow_analysis()->failing()) return "not compilable (flow analysis failed)";
+ if (!callee->can_be_parsed()) return "cannot be parsed";
return NULL;
}