OLD | NEW |
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_H_ | 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ | 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void ScheduleMoreBackgroundTasksIfNeeded(); | 113 void ScheduleMoreBackgroundTasksIfNeeded(); |
114 void ScheduleIdleTaskFromAnyThread(); | 114 void ScheduleIdleTaskFromAnyThread(); |
115 void ScheduleIdleTaskIfNeeded(); | 115 void ScheduleIdleTaskIfNeeded(); |
116 void ScheduleAbortTask(); | 116 void ScheduleAbortTask(); |
117 void DoBackgroundWork(); | 117 void DoBackgroundWork(); |
118 void DoIdleWork(double deadline_in_seconds); | 118 void DoIdleWork(double deadline_in_seconds); |
119 | 119 |
120 Isolate* isolate_; | 120 Isolate* isolate_; |
121 Platform* platform_; | 121 Platform* platform_; |
122 size_t max_stack_size_; | 122 size_t max_stack_size_; |
| 123 |
| 124 // Copy of FLAG_trace_compiler_dispatcher to allow for access from any thread. |
| 125 bool trace_compiler_dispatcher_; |
| 126 |
123 std::unique_ptr<CompilerDispatcherTracer> tracer_; | 127 std::unique_ptr<CompilerDispatcherTracer> tracer_; |
124 | 128 |
125 std::unique_ptr<CancelableTaskManager> task_manager_; | 129 std::unique_ptr<CancelableTaskManager> task_manager_; |
126 | 130 |
127 // Mapping from (script id, function literal id) to job. We use a multimap, | 131 // Mapping from (script id, function literal id) to job. We use a multimap, |
128 // as script id is not necessarily unique. | 132 // as script id is not necessarily unique. |
129 JobMap jobs_; | 133 JobMap jobs_; |
130 | 134 |
131 base::AtomicValue<v8::MemoryPressureLevel> memory_pressure_level_; | 135 base::AtomicValue<v8::MemoryPressureLevel> memory_pressure_level_; |
132 | 136 |
(...skipping 25 matching lines...) Expand all Loading... |
158 base::AtomicValue<bool> block_for_testing_; | 162 base::AtomicValue<bool> block_for_testing_; |
159 base::Semaphore semaphore_for_testing_; | 163 base::Semaphore semaphore_for_testing_; |
160 | 164 |
161 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcher); | 165 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcher); |
162 }; | 166 }; |
163 | 167 |
164 } // namespace internal | 168 } // namespace internal |
165 } // namespace v8 | 169 } // namespace v8 |
166 | 170 |
167 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ | 171 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
OLD | NEW |