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

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

Issue 2413243002: Introduce a CompilerDispatcherTracer and track how long jobs take (Closed)
Patch Set: Created 4 years, 2 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 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"
11 #include "src/handles.h" 11 #include "src/handles.h"
12 #include "testing/gtest/include/gtest/gtest_prod.h" 12 #include "testing/gtest/include/gtest/gtest_prod.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 class CompilerDispatcherTracer;
17 class CompilationInfo; 18 class CompilationInfo;
18 class CompilationJob; 19 class CompilationJob;
19 class Isolate; 20 class Isolate;
20 class ParseInfo; 21 class ParseInfo;
21 class Parser; 22 class Parser;
22 class SharedFunctionInfo; 23 class SharedFunctionInfo;
23 class String; 24 class String;
24 class UnicodeCache; 25 class UnicodeCache;
25 class Utf16CharacterStream; 26 class Utf16CharacterStream;
26 class Zone; 27 class Zone;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool FinalizeCompilingOnMainThread(); 75 bool FinalizeCompilingOnMainThread();
75 76
76 // Transition from any state to kInitial and free all resources. 77 // Transition from any state to kInitial and free all resources.
77 void ResetOnMainThread(); 78 void ResetOnMainThread();
78 79
79 private: 80 private:
80 FRIEND_TEST(CompilerDispatcherJobTest, ScopeChain); 81 FRIEND_TEST(CompilerDispatcherJobTest, ScopeChain);
81 82
82 CompileJobStatus status_ = CompileJobStatus::kInitial; 83 CompileJobStatus status_ = CompileJobStatus::kInitial;
83 Isolate* isolate_; 84 Isolate* isolate_;
85 CompilerDispatcherTracer* tracer_;
84 Handle<SharedFunctionInfo> shared_; // Global handle. 86 Handle<SharedFunctionInfo> shared_; // Global handle.
85 Handle<String> source_; // Global handle. 87 Handle<String> source_; // Global handle.
86 size_t max_stack_size_; 88 size_t max_stack_size_;
87 89
88 // Members required for parsing. 90 // Members required for parsing.
89 std::unique_ptr<UnicodeCache> unicode_cache_; 91 std::unique_ptr<UnicodeCache> unicode_cache_;
90 std::unique_ptr<Zone> zone_; 92 std::unique_ptr<Zone> zone_;
91 std::unique_ptr<Utf16CharacterStream> character_stream_; 93 std::unique_ptr<Utf16CharacterStream> character_stream_;
92 std::unique_ptr<ParseInfo> parse_info_; 94 std::unique_ptr<ParseInfo> parse_info_;
93 std::unique_ptr<Parser> parser_; 95 std::unique_ptr<Parser> parser_;
94 std::unique_ptr<DeferredHandles> handles_from_parsing_; 96 std::unique_ptr<DeferredHandles> handles_from_parsing_;
95 97
96 // Members required for compiling. 98 // Members required for compiling.
97 std::unique_ptr<CompilationInfo> compile_info_; 99 std::unique_ptr<CompilationInfo> compile_info_;
98 std::unique_ptr<CompilationJob> compile_job_; 100 std::unique_ptr<CompilationJob> compile_job_;
99 101
100 bool can_parse_on_background_thread_; 102 bool can_parse_on_background_thread_;
101 bool can_compile_on_background_thread_; 103 bool can_compile_on_background_thread_;
102 104
103 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob); 105 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob);
104 }; 106 };
105 107
106 } // namespace internal 108 } // namespace internal
107 } // namespace v8 109 } // namespace v8
108 110
109 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 111 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698