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

Side by Side Diff: src/heap/sweeper-thread.h

Issue 437993003: Move a bunch of GC related files to heap/ subdirectory (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make presubmit happy Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/spaces-inl.h ('k') | src/heap/sweeper-thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_SWEEPER_THREAD_H_ 5 #ifndef V8_HEAP_SWEEPER_THREAD_H_
6 #define V8_SWEEPER_THREAD_H_ 6 #define V8_HEAP_SWEEPER_THREAD_H_
7 7
8 #include "src/base/atomicops.h" 8 #include "src/base/atomicops.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/flags.h" 10 #include "src/flags.h"
11 #include "src/utils.h" 11 #include "src/utils.h"
12 12
13 #include "src/spaces.h" 13 #include "src/heap/spaces.h"
14 14
15 #include "src/heap.h" 15 #include "src/heap/heap.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 19
20 class SweeperThread : public base::Thread { 20 class SweeperThread : public base::Thread {
21 public: 21 public:
22 explicit SweeperThread(Isolate* isolate); 22 explicit SweeperThread(Isolate* isolate);
23 ~SweeperThread() {} 23 ~SweeperThread() {}
24 24
25 void Run(); 25 void Run();
26 void Stop(); 26 void Stop();
27 void StartSweeping(); 27 void StartSweeping();
28 void WaitForSweeperThread(); 28 void WaitForSweeperThread();
29 bool SweepingCompleted(); 29 bool SweepingCompleted();
30 30
31 static int NumberOfThreads(int max_available); 31 static int NumberOfThreads(int max_available);
32 32
33 private: 33 private:
34 Isolate* isolate_; 34 Isolate* isolate_;
35 Heap* heap_; 35 Heap* heap_;
36 MarkCompactCollector* collector_; 36 MarkCompactCollector* collector_;
37 base::Semaphore start_sweeping_semaphore_; 37 base::Semaphore start_sweeping_semaphore_;
38 base::Semaphore end_sweeping_semaphore_; 38 base::Semaphore end_sweeping_semaphore_;
39 base::Semaphore stop_semaphore_; 39 base::Semaphore stop_semaphore_;
40 volatile base::AtomicWord stop_thread_; 40 volatile base::AtomicWord stop_thread_;
41 }; 41 };
42 }
43 } // namespace v8::internal
42 44
43 } } // namespace v8::internal 45 #endif // V8_HEAP_SWEEPER_THREAD_H_
44
45 #endif // V8_SWEEPER_THREAD_H_
OLDNEW
« no previous file with comments | « src/heap/spaces-inl.h ('k') | src/heap/sweeper-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698