Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Unified Diff: src/runtime.cc

Issue 12488006: Parallel recompilation: remove interrupt for code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 59a25db67fb76051d44543fb8f29f5639bf727da..b52ac294d4d271dfbc250095f0a663981dbb73e3 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7745,30 +7745,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ParallelRecompile) {
}
-RUNTIME_FUNCTION(MaybeObject*, Runtime_ForceParallelRecompile) {
- if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
- HandleScope handle_scope(isolate);
- ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
- if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
- return isolate->Throw(*isolate->factory()->InternalizeOneByteString(
- STATIC_ASCII_VECTOR("Recompile queue is full.")));
- }
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
- fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile));
- Compiler::RecompileParallel(fun);
- return isolate->heap()->undefined_value();
-}
-
-
RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) {
if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
HandleScope handle_scope(isolate);
- ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
+ ASSERT(FLAG_parallel_recompilation);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
Sven Panne 2013/03/12 15:44:51 Can we please move the argument access macros (and
Yang 2013/03/12 18:03:38 Done.
OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread();
- Handle<SharedFunctionInfo> shared(fun->shared());
- while (*opt_thread->InstallNextOptimizedFunction() != *shared) { }
- return isolate->heap()->undefined_value();
+ opt_thread->InstallOptimizedFunctions();
+ return function->code();
}
@@ -7937,6 +7921,19 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_WaitUntilOptimized) {
+ RUNTIME_ASSERT(args.length() == 1);
+ if (FLAG_parallel_recompilation) {
+ HandleScope scope(isolate);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
Sven Panne 2013/03/12 15:44:51 Same as above.
Yang 2013/03/12 18:03:38 Done.
+ if (V8::UseCrankshaft() && function->IsOptimizable()) {
+ while (!function->IsOptimized()) OS::Sleep(50);
+ }
+ }
+ return isolate->heap()->undefined_value();
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
« src/optimizing-compiler-thread.cc ('K') | « src/runtime.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698