mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6614597: Performance variability in jvm2008 xml.validation
Fix incorrect marking of methods as not compilable. Reviewed-by: never
This commit is contained in:
parent
4e8608a124
commit
0c27c5537e
18 changed files with 213 additions and 133 deletions
|
@ -843,13 +843,15 @@ static bool count_find_witness_calls() {
|
|||
if (occasional_print || final_stats) {
|
||||
// Every now and then dump a little info about dependency searching.
|
||||
if (xtty != NULL) {
|
||||
xtty->elem("deps_find_witness calls='%d' steps='%d' recursions='%d' singles='%d'",
|
||||
ttyLocker ttyl;
|
||||
xtty->elem("deps_find_witness calls='%d' steps='%d' recursions='%d' singles='%d'",
|
||||
deps_find_witness_calls,
|
||||
deps_find_witness_steps,
|
||||
deps_find_witness_recursions,
|
||||
deps_find_witness_singles);
|
||||
}
|
||||
if (final_stats || (TraceDependencies && WizardMode)) {
|
||||
ttyLocker ttyl;
|
||||
tty->print_cr("Dependency check (find_witness) "
|
||||
"calls=%d, steps=%d (avg=%.1f), recursions=%d, singles=%d",
|
||||
deps_find_witness_calls,
|
||||
|
|
|
@ -1117,7 +1117,6 @@ void nmethod::make_unloaded(BoolObjectClosure* is_alive, oop cause) {
|
|||
if (_method->code() == this) {
|
||||
_method->clear_code(); // Break a cycle
|
||||
}
|
||||
inc_decompile_count(); // Last chance to make a mark on the MDO
|
||||
_method = NULL; // Clear the method of this dead nmethod
|
||||
}
|
||||
// Make the class unloaded - i.e., change state and notify sweeper
|
||||
|
@ -1177,15 +1176,17 @@ void nmethod::log_state_change() const {
|
|||
bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
|
||||
assert(state == zombie || state == not_entrant, "must be zombie or not_entrant");
|
||||
|
||||
// If the method is already zombie there is nothing to do
|
||||
if (is_zombie()) {
|
||||
return false;
|
||||
}
|
||||
bool was_alive = false;
|
||||
|
||||
// Make sure the nmethod is not flushed in case of a safepoint in code below.
|
||||
nmethodLocker nml(this);
|
||||
|
||||
{
|
||||
// If the method is already zombie there is nothing to do
|
||||
if (is_zombie()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// invalidate osr nmethod before acquiring the patching lock since
|
||||
// they both acquire leaf locks and we don't want a deadlock.
|
||||
// This logic is equivalent to the logic below for patching the
|
||||
|
@ -1223,6 +1224,8 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
|
|||
assert(state == not_entrant, "other cases may need to be handled differently");
|
||||
}
|
||||
|
||||
was_alive = is_in_use(); // Read state under lock
|
||||
|
||||
// Change state
|
||||
flags.state = state;
|
||||
|
||||
|
@ -1249,8 +1252,11 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
|
|||
mark_as_seen_on_stack();
|
||||
}
|
||||
|
||||
// It's a true state change, so mark the method as decompiled.
|
||||
inc_decompile_count();
|
||||
if (was_alive) {
|
||||
// It's a true state change, so mark the method as decompiled.
|
||||
// Do it only for transition from alive.
|
||||
inc_decompile_count();
|
||||
}
|
||||
|
||||
// zombie only - if a JVMTI agent has enabled the CompiledMethodUnload event
|
||||
// and it hasn't already been reported for this nmethod then report it now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue