8152004: CTW crashes with failed assertion after 8150646 integration

Reviewed-by: kvn, neliasso
This commit is contained in:
Filipp Zhinkin 2016-03-17 09:50:00 +03:00
parent 4036d37a8f
commit 591784c35a
4 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2013, 2016, 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
@ -1057,8 +1057,6 @@ void* ciReplay::load_inline_data(ciMethod* method, int entry_bci, int comp_level
int ciReplay::replay_impl(TRAPS) {
HandleMark hm;
ResourceMark rm;
// Make sure we don't run with background compilation
BackgroundCompilation = false;
if (ReplaySuppressInitializers > 2) {
// ReplaySuppressInitializers > 2 means that we want to allow

View File

@ -1358,8 +1358,7 @@ void ClassLoader::compile_the_world() {
EXCEPTION_MARK;
HandleMark hm(THREAD);
ResourceMark rm(THREAD);
// Make sure we don't run with background compilation
BackgroundCompilation = false;
// Find bootstrap loader
Handle system_class_loader (THREAD, SystemDictionary::java_system_loader());
// Iterate over all bootstrap class path entries

View File

@ -1170,7 +1170,8 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci,
CompilationPolicy::policy()->delay_compilation(method());
return NULL;
}
compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, !directive->BackgroundCompilationOption, THREAD);
bool is_blocking = !directive->BackgroundCompilationOption || CompileTheWorld || ReplayCompiles;
compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, is_blocking, THREAD);
}
// return requested nmethod

View File

@ -2484,6 +2484,13 @@ bool Arguments::check_vm_args_consistency() {
warning("Reserved Stack Area not supported on this platform");
}
#endif
if (BackgroundCompilation && (CompileTheWorld || ReplayCompiles)) {
if (!FLAG_IS_DEFAULT(BackgroundCompilation)) {
warning("BackgroundCompilation disabled due to CompileTheWorld or ReplayCompiles options.");
}
FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
}
return status;
}