Fix infinite loop in regress-opt-after-deopt.
%CompleteOptimization attempts to install optimized functions that the parallel thread has put on the output queue, as long as the function is marked with a builtin. However, activating the debugger will set all functions to the lazy recompile builtin, without the function being on the parallel recompilation pipeline. So we wait for the function to finish parallel recompilation while it's marked by a builtin that's unrelated to parallel recompilation. R=hpayer@chromium.org BUG= Review URL: https://codereview.chromium.org/18129003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
4aed3b8e84
commit
daf4101aa4
@ -8314,8 +8314,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompleteOptimization) {
|
||||
ASSERT(args.length() == 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
||||
if (FLAG_parallel_recompilation && V8::UseCrankshaft()) {
|
||||
// While function is in optimization pipeline, it is marked with builtins.
|
||||
while (function->code()->kind() == Code::BUILTIN) {
|
||||
// While function is in optimization pipeline, it is marked accordingly.
|
||||
// Note that if the debugger is activated during parallel recompilation,
|
||||
// the function will be marked with the lazy-recompile builtin, which is
|
||||
// not related to parallel recompilation.
|
||||
while (function->IsMarkedForParallelRecompilation() ||
|
||||
function->IsInRecompileQueue() ||
|
||||
function->IsMarkedForInstallingRecompiledCode()) {
|
||||
isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
|
||||
OS::Sleep(50);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user