Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index f7d89cd56493125ce0db7680661601b41d512be5..73958ad2fead5d2ef5d0742cd47b29f5427c099d 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -54,8 +54,12 @@ class Compiler : public AllStatic { |
| static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
| static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script); |
| + // Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse. |
| + static CompilationJob* PrepareUnoptimizedCompilationJob( |
|
Michael Starzinger
2016/08/19 10:54:14
This API method doesn't seem to be used nor implem
Michael Starzinger
2016/08/19 10:57:10
Ooops, overlooked the obvious. Please disregard th
|
| + CompilationInfo* info); |
| + |
| // Generate and install code from previously queued compilation job. |
| - static void FinalizeCompilationJob(CompilationJob* job); |
| + static bool FinalizeCompilationJob(CompilationJob* job); |
| // Give the compiler a chance to perform low-latency initialization tasks of |
| // the given {function} on its instantiation. Note that only the runtime will |
| @@ -589,8 +593,6 @@ class CompilationJob { |
| return FAILED; |
| } |
| - void RecordOptimizationStats(); |
| - |
| State state() const { return state_; } |
| CompilationInfo* info() const { return info_; } |
| Isolate* isolate() const { return info()->isolate(); } |
| @@ -602,6 +604,17 @@ class CompilationJob { |
| virtual Status FinalizeJobImpl() = 0; |
| private: |
| + void RecordOptimizedCompilationStats() const; |
| + void RecordUnoptimizedCompilationStats() const; |
| + |
| + void RecordCompilationStats() const { |
|
Michael Starzinger
2016/08/19 10:54:14
nit: I'm not sure the job itself should record sta
rmcilroy
2016/08/22 13:27:08
Done.
|
| + if (info_->IsOptimizing()) { |
| + RecordOptimizedCompilationStats(); |
| + } else { |
| + RecordUnoptimizedCompilationStats(); |
| + } |
| + } |
| + |
| CompilationInfo* info_; |
| base::TimeDelta time_taken_to_prepare_; |
| base::TimeDelta time_taken_to_execute_; |