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

Unified Diff: src/heap/concurrent-marking.h

Issue 2732053002: [heap] Implement simple marking in the concurrent marking thread. (Closed)
Patch Set: re-upload Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/concurrent-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/concurrent-marking.h
diff --git a/src/heap/concurrent-marking.h b/src/heap/concurrent-marking.h
index 349b844d67d08aeb0da9104628cc2bebb67c9bae..70842cd230d01c13810026bd5c28f4c6a0aa2c1a 100644
--- a/src/heap/concurrent-marking.h
+++ b/src/heap/concurrent-marking.h
@@ -5,9 +5,10 @@
#ifndef V8_HEAP_CONCURRENT_MARKING_
#define V8_HEAP_CONCURRENT_MARKING_
+#include <vector>
+
#include "src/allocation.h"
#include "src/cancelable-task.h"
-#include "src/locked-queue.h"
#include "src/utils.h"
#include "src/v8.h"
@@ -19,27 +20,19 @@ class Isolate;
class ConcurrentMarking {
public:
- static const int kMaxNumberOfTasks = 10;
-
explicit ConcurrentMarking(Heap* heap);
~ConcurrentMarking();
- void EnqueueObject(HeapObject* object);
- bool IsQueueEmpty();
+ void AddRoot(HeapObject* object);
- void StartMarkingTasks(int number_of_tasks);
- void WaitForTasksToComplete();
+ void StartMarkingTask();
+ void WaitForTaskToComplete();
private:
class Task;
- // TODO(ulan): Replace with faster queue.
- typedef LockedQueue<HeapObject*> Queue;
-
Heap* heap_;
- base::Semaphore pending_tasks_;
- Queue queue_;
- int number_of_tasks_;
- uint32_t task_ids_[kMaxNumberOfTasks];
+ base::Semaphore pending_task_;
+ std::vector<HeapObject*> root_set_;
};
} // namespace internal
« no previous file with comments | « no previous file | src/heap/concurrent-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698