8191688: Assert failed in > 200 tests: failed dependencies, but counter didn't change

Reviewed-by: kvn
This commit is contained in:
Dean Long 2017-11-22 09:27:06 -08:00
parent 6feaa2cb69
commit 2142e55df1
4 changed files with 8 additions and 2 deletions

@ -3441,6 +3441,7 @@ const char* GraphBuilder::check_can_parse(ciMethod* callee) const {
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;
}

@ -87,6 +87,7 @@ ciMethod::ciMethod(const methodHandle& h_m, ciInstanceKlass* holder) :
_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 @@ ciMethod::ciMethod(const methodHandle& h_m, ciInstanceKlass* holder) :
#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());

@ -87,6 +87,7 @@ class ciMethod : public ciMetadata {
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 @@ class ciMethod : public ciMetadata {
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();

@ -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 @@ const char* InlineTree::check_can_parse(ciMethod* callee) {
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;
}