# HG changeset patch # User fzhinkin # Date 1458197400 -10800 # Node ID 539a2817f0b4120150f1138764857f2082700477 # Parent b9a6883c30eec7463a1ba9512e107c8b3a8385f1 8152004: CTW crashes with failed assertion after 8150646 integration Reviewed-by: kvn, neliasso diff -r b9a6883c30ee -r 539a2817f0b4 hotspot/src/share/vm/ci/ciReplay.cpp --- a/hotspot/src/share/vm/ci/ciReplay.cpp Thu Mar 17 16:10:58 2016 -1000 +++ b/hotspot/src/share/vm/ci/ciReplay.cpp Thu Mar 17 09:50:00 2016 +0300 @@ -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 @@ 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 diff -r b9a6883c30ee -r 539a2817f0b4 hotspot/src/share/vm/classfile/classLoader.cpp --- a/hotspot/src/share/vm/classfile/classLoader.cpp Thu Mar 17 16:10:58 2016 -1000 +++ b/hotspot/src/share/vm/classfile/classLoader.cpp Thu Mar 17 09:50:00 2016 +0300 @@ -1358,8 +1358,7 @@ 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 diff -r b9a6883c30ee -r 539a2817f0b4 hotspot/src/share/vm/compiler/compileBroker.cpp --- a/hotspot/src/share/vm/compiler/compileBroker.cpp Thu Mar 17 16:10:58 2016 -1000 +++ b/hotspot/src/share/vm/compiler/compileBroker.cpp Thu Mar 17 09:50:00 2016 +0300 @@ -1170,7 +1170,8 @@ 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 diff -r b9a6883c30ee -r 539a2817f0b4 hotspot/src/share/vm/runtime/arguments.cpp --- a/hotspot/src/share/vm/runtime/arguments.cpp Thu Mar 17 16:10:58 2016 -1000 +++ b/hotspot/src/share/vm/runtime/arguments.cpp Thu Mar 17 09:50:00 2016 +0300 @@ -2484,6 +2484,13 @@ 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; }