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

Unified Diff: src/mark-compact.h

Issue 12462002: Wait for sweeper threads in EnsureSweeperProgress() only if the main thread finished its sweeping p… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index b5d60fd41e80f81f5395dff0ee0f665dc161c8d2..1c508fe2a8fea191a6b8de047c396a1aab7e9596 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -698,6 +698,14 @@ class MarkCompactCollector {
void FinalizeSweeping();
+ void set_sequential_sweeping(bool sequential_sweeping) {
+ sequential_sweeping_ = sequential_sweeping;
+ }
+
+ bool sequential_sweeping() const {
+ return sequential_sweeping_;
+ }
+
// Parallel marking support.
void MarkInParallel();
@@ -749,6 +757,8 @@ class MarkCompactCollector {
// True if concurrent or parallel sweeping is currently in progress.
bool sweeping_pending_;
+ bool sequential_sweeping_;
+
// A pointer to the current stack-allocated GC tracer object during a full
// collection (NULL before and after).
GCTracer* tracer_;
@@ -904,6 +914,22 @@ class MarkCompactCollector {
};
+class SequentialSweepingScope BASE_EMBEDDED {
+ public:
+ explicit SequentialSweepingScope(MarkCompactCollector *collector) :
+ collector_(collector) {
+ collector_->set_sequential_sweeping(true);
+ }
+
+ ~SequentialSweepingScope() {
+ collector_->set_sequential_sweeping(false);
+ }
+
+ private:
+ MarkCompactCollector* collector_;
+};
+
+
const char* AllocationSpaceName(AllocationSpace space);
} } // namespace v8::internal
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698