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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher.h

Issue 2611313002: [complier] Enable parallel eager inner function compilation with compiler dispatcher. (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « src/compiler.cc ('k') | src/compiler-dispatcher/compiler-dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher.h
diff --git a/src/compiler-dispatcher/compiler-dispatcher.h b/src/compiler-dispatcher/compiler-dispatcher.h
index 41d4c83d52e0db287b20ced388316cce7b604205..431a1ec3346f19cb2dab87f4084b8878a92b31d4 100644
--- a/src/compiler-dispatcher/compiler-dispatcher.h
+++ b/src/compiler-dispatcher/compiler-dispatcher.h
@@ -28,6 +28,7 @@ namespace internal {
class CancelableTaskManager;
class CompilerDispatcherJob;
class CompilerDispatcherTracer;
+class FunctionLiteral;
class Isolate;
class SharedFunctionInfo;
@@ -68,7 +69,10 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
size_t max_stack_size);
~CompilerDispatcher();
- // Returns true if a job was enqueued.
+ // Returns true if the compiler dispatcher is enabled.
+ bool IsEnabled() const;
+
+ // Enqueue a job for parse and compile. Returns true if a job was enqueued.
bool Enqueue(Handle<SharedFunctionInfo> function);
// Like Enqueue, but also advances the job so that it can potentially
@@ -76,13 +80,27 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
// true if the job was enqueued.
bool EnqueueAndStep(Handle<SharedFunctionInfo> function);
+ // Enqueue a job for compilation. Function must have already been parsed and
+ // analyzed and be ready for compilation. Returns true if a job was enqueued.
+ bool Enqueue(Handle<SharedFunctionInfo> function, FunctionLiteral* literal);
+
+ // Like Enqueue, but also advances the job so that it can potentially
+ // continue running on a background thread (if at all possible). Returns
+ // true if the job was enqueued.
+ bool EnqueueAndStep(Handle<SharedFunctionInfo> function,
+ FunctionLiteral* literal);
+
// Returns true if there is a pending job for the given function.
bool IsEnqueued(Handle<SharedFunctionInfo> function) const;
// Blocks until the given function is compiled (and does so as fast as
- // possible). Returns true if the compile job was succesful.
+ // possible). Returns true if the compile job was successful.
bool FinishNow(Handle<SharedFunctionInfo> function);
+ // Blocks until all enqueued jobs have finished. Returns true if all the
+ // compile jobs were successful.
+ bool FinishAllNow();
+
// Aborts a given job. Blocks if requested.
void Abort(Handle<SharedFunctionInfo> function, BlockingBehavior blocking);
@@ -95,6 +113,8 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
private:
FRIEND_TEST(CompilerDispatcherTest, EnqueueAndStep);
+ FRIEND_TEST(CompilerDispatcherTest, EnqueueParsed);
+ FRIEND_TEST(CompilerDispatcherTest, EnqueueAndStepParsed);
FRIEND_TEST(CompilerDispatcherTest, IdleTaskSmallIdleTime);
FRIEND_TEST(CompilerDispatcherTest, CompileOnBackgroundThread);
FRIEND_TEST(CompilerDispatcherTest, FinishNowWithBackgroundTask);
@@ -110,9 +130,10 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
class IdleTask;
void WaitForJobIfRunningOnBackground(CompilerDispatcherJob* job);
- bool IsEnabled() const;
void AbortInactiveJobs();
+ bool CanEnqueue(Handle<SharedFunctionInfo> function);
JobMap::const_iterator GetJobFor(Handle<SharedFunctionInfo> shared) const;
+ bool FinishNow(CompilerDispatcherJob* job);
void ConsiderJobForBackgroundProcessing(CompilerDispatcherJob* job);
void ScheduleMoreBackgroundTasksIfNeeded();
void ScheduleIdleTaskFromAnyThread();
« no previous file with comments | « src/compiler.cc ('k') | src/compiler-dispatcher/compiler-dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698