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

Side by Side Diff: src/compiler-dispatcher/compiler-dispatcher-job.h

Issue 2573493002: Use idle time to make progress on scheduled compilation jobs (Closed)
Patch Set: updates Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Transition from kReadyToCompile to kCompiled. 76 // Transition from kReadyToCompile to kCompiled.
77 void Compile(); 77 void Compile();
78 78
79 // Transition from kCompiled to kDone (or kFailed). Returns false when 79 // Transition from kCompiled to kDone (or kFailed). Returns false when
80 // transitioning to kFailed. In that case, an exception is pending. 80 // transitioning to kFailed. In that case, an exception is pending.
81 bool FinalizeCompilingOnMainThread(); 81 bool FinalizeCompilingOnMainThread();
82 82
83 // Transition from any state to kInitial and free all resources. 83 // Transition from any state to kInitial and free all resources.
84 void ResetOnMainThread(); 84 void ResetOnMainThread();
85 85
86 // Estimate how long the next step will take using the tracer.
87 double EstimateRuntimeOfNextStepInMs() const;
88
86 private: 89 private:
87 FRIEND_TEST(CompilerDispatcherJobTest, ScopeChain); 90 FRIEND_TEST(CompilerDispatcherJobTest, ScopeChain);
88 91
89 CompileJobStatus status_ = CompileJobStatus::kInitial; 92 CompileJobStatus status_ = CompileJobStatus::kInitial;
90 Isolate* isolate_; 93 Isolate* isolate_;
91 CompilerDispatcherTracer* tracer_; 94 CompilerDispatcherTracer* tracer_;
92 Handle<SharedFunctionInfo> shared_; // Global handle. 95 Handle<SharedFunctionInfo> shared_; // Global handle.
93 Handle<String> source_; // Global handle. 96 Handle<String> source_; // Global handle.
94 size_t max_stack_size_; 97 size_t max_stack_size_;
95 98
(...skipping 12 matching lines...) Expand all
108 bool can_parse_on_background_thread_; 111 bool can_parse_on_background_thread_;
109 bool can_compile_on_background_thread_; 112 bool can_compile_on_background_thread_;
110 113
111 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob); 114 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob);
112 }; 115 };
113 116
114 } // namespace internal 117 } // namespace internal
115 } // namespace v8 118 } // namespace v8
116 119
117 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 120 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698