| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 class ExternalReferenceTable; | 68 class ExternalReferenceTable; |
| 69 class Factory; | 69 class Factory; |
| 70 class FunctionInfoListener; | 70 class FunctionInfoListener; |
| 71 class HandleScopeImplementer; | 71 class HandleScopeImplementer; |
| 72 class HeapProfiler; | 72 class HeapProfiler; |
| 73 class HStatistics; | 73 class HStatistics; |
| 74 class HTracer; | 74 class HTracer; |
| 75 class InlineRuntimeFunctionsTable; | 75 class InlineRuntimeFunctionsTable; |
| 76 class NoAllocationStringAllocator; | 76 class NoAllocationStringAllocator; |
| 77 class InnerPointerToCodeCache; | 77 class InnerPointerToCodeCache; |
| 78 class MarkingThread; | |
| 79 class PreallocatedMemoryThread; | 78 class PreallocatedMemoryThread; |
| 80 class RandomNumberGenerator; | 79 class RandomNumberGenerator; |
| 81 class RegExpStack; | 80 class RegExpStack; |
| 82 class SaveContext; | 81 class SaveContext; |
| 83 class UnicodeCache; | 82 class UnicodeCache; |
| 84 class ConsStringIteratorOp; | 83 class ConsStringIteratorOp; |
| 85 class StringTracker; | 84 class StringTracker; |
| 86 class StubCache; | 85 class StubCache; |
| 87 class SweeperThread; | 86 class SweeperThread; |
| 88 class ThreadManager; | 87 class ThreadManager; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 300 |
| 302 Address try_catch_handler_address_; | 301 Address try_catch_handler_address_; |
| 303 }; | 302 }; |
| 304 | 303 |
| 305 | 304 |
| 306 class SystemThreadManager { | 305 class SystemThreadManager { |
| 307 public: | 306 public: |
| 308 enum ParallelSystemComponent { | 307 enum ParallelSystemComponent { |
| 309 PARALLEL_SWEEPING, | 308 PARALLEL_SWEEPING, |
| 310 CONCURRENT_SWEEPING, | 309 CONCURRENT_SWEEPING, |
| 311 PARALLEL_MARKING, | |
| 312 PARALLEL_RECOMPILATION | 310 PARALLEL_RECOMPILATION |
| 313 }; | 311 }; |
| 314 | 312 |
| 315 static int NumberOfParallelSystemThreads(ParallelSystemComponent type); | 313 static int NumberOfParallelSystemThreads(ParallelSystemComponent type); |
| 316 | 314 |
| 317 static const int kMaxThreads = 4; | 315 static const int kMaxThreads = 4; |
| 318 }; | 316 }; |
| 319 | 317 |
| 320 | 318 |
| 321 #ifdef ENABLE_DEBUGGER_SUPPORT | 319 #ifdef ENABLE_DEBUGGER_SUPPORT |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 | 1098 |
| 1101 OptimizingCompilerThread* optimizing_compiler_thread() { | 1099 OptimizingCompilerThread* optimizing_compiler_thread() { |
| 1102 return optimizing_compiler_thread_; | 1100 return optimizing_compiler_thread_; |
| 1103 } | 1101 } |
| 1104 | 1102 |
| 1105 // PreInits and returns a default isolate. Needed when a new thread tries | 1103 // PreInits and returns a default isolate. Needed when a new thread tries |
| 1106 // to create a Locker for the first time (the lock itself is in the isolate). | 1104 // to create a Locker for the first time (the lock itself is in the isolate). |
| 1107 // TODO(svenpanne) This method is on death row... | 1105 // TODO(svenpanne) This method is on death row... |
| 1108 static v8::Isolate* GetDefaultIsolateForLocking(); | 1106 static v8::Isolate* GetDefaultIsolateForLocking(); |
| 1109 | 1107 |
| 1110 MarkingThread** marking_threads() { | |
| 1111 return marking_thread_; | |
| 1112 } | |
| 1113 | |
| 1114 SweeperThread** sweeper_threads() { | 1108 SweeperThread** sweeper_threads() { |
| 1115 return sweeper_thread_; | 1109 return sweeper_thread_; |
| 1116 } | 1110 } |
| 1117 | 1111 |
| 1118 int id() const { return static_cast<int>(id_); } | 1112 int id() const { return static_cast<int>(id_); } |
| 1119 | 1113 |
| 1120 HStatistics* GetHStatistics(); | 1114 HStatistics* GetHStatistics(); |
| 1121 HTracer* GetHTracer(); | 1115 HTracer* GetHTracer(); |
| 1122 | 1116 |
| 1123 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } | 1117 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 // between compilation units. | 1349 // between compilation units. |
| 1356 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1350 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1357 static const intptr_t name##_debug_offset_; | 1351 static const intptr_t name##_debug_offset_; |
| 1358 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1352 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1359 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1353 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1360 #undef ISOLATE_FIELD_OFFSET | 1354 #undef ISOLATE_FIELD_OFFSET |
| 1361 #endif | 1355 #endif |
| 1362 | 1356 |
| 1363 DeferredHandles* deferred_handles_head_; | 1357 DeferredHandles* deferred_handles_head_; |
| 1364 OptimizingCompilerThread* optimizing_compiler_thread_; | 1358 OptimizingCompilerThread* optimizing_compiler_thread_; |
| 1365 MarkingThread** marking_thread_; | |
| 1366 SweeperThread** sweeper_thread_; | 1359 SweeperThread** sweeper_thread_; |
| 1367 | 1360 |
| 1368 // Counts deopt points if deopt_every_n_times is enabled. | 1361 // Counts deopt points if deopt_every_n_times is enabled. |
| 1369 unsigned int stress_deopt_count_; | 1362 unsigned int stress_deopt_count_; |
| 1370 | 1363 |
| 1371 friend class ExecutionAccess; | 1364 friend class ExecutionAccess; |
| 1372 friend class HandleScopeImplementer; | 1365 friend class HandleScopeImplementer; |
| 1373 friend class IsolateInitializer; | 1366 friend class IsolateInitializer; |
| 1374 friend class MarkingThread; | |
| 1375 friend class OptimizingCompilerThread; | 1367 friend class OptimizingCompilerThread; |
| 1376 friend class SweeperThread; | 1368 friend class SweeperThread; |
| 1377 friend class ThreadManager; | 1369 friend class ThreadManager; |
| 1378 friend class Simulator; | 1370 friend class Simulator; |
| 1379 friend class StackGuard; | 1371 friend class StackGuard; |
| 1380 friend class ThreadId; | 1372 friend class ThreadId; |
| 1381 friend class TestMemoryAllocatorScope; | 1373 friend class TestMemoryAllocatorScope; |
| 1382 friend class TestCodeRangeScope; | 1374 friend class TestCodeRangeScope; |
| 1383 friend class v8::Isolate; | 1375 friend class v8::Isolate; |
| 1384 friend class v8::Locker; | 1376 friend class v8::Locker; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 | 1516 |
| 1525 // Mark the native context with out of memory. | 1517 // Mark the native context with out of memory. |
| 1526 inline void Context::mark_out_of_memory() { | 1518 inline void Context::mark_out_of_memory() { |
| 1527 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); | 1519 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); |
| 1528 } | 1520 } |
| 1529 | 1521 |
| 1530 | 1522 |
| 1531 } } // namespace v8::internal | 1523 } } // namespace v8::internal |
| 1532 | 1524 |
| 1533 #endif // V8_ISOLATE_H_ | 1525 #endif // V8_ISOLATE_H_ |
| OLD | NEW |