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

Unified Diff: runtime/vm/store_buffer.h

Issue 14348026: Drain StoreBufferBlock into store buffer instead of iterating over it directly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: unify draining Created 7 years, 8 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 | « runtime/vm/scavenger.cc ('k') | runtime/vm/store_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/store_buffer.h
diff --git a/runtime/vm/store_buffer.h b/runtime/vm/store_buffer.h
index bc5295874a9391c889800e747a381fda41b62d6e..5657f796d52b2dbd34292f8c566cc80c81831a8f 100644
--- a/runtime/vm/store_buffer.h
+++ b/runtime/vm/store_buffer.h
@@ -95,6 +95,12 @@ class StoreBuffer {
void AddPointer(uword address);
+ // Drain StoreBufferBlock into deduplication sets.
+ // Returns true if new sets were created.
+ bool DrainBlock(StoreBufferBlock* block);
+
+ // Drain StoreBufferBlock into deduplication sets.
+ // Schedule an interrupt if we run over the max number of deduplication sets.
void ProcessBlock(StoreBufferBlock* block);
DedupSet* DedupSets() {
@@ -105,6 +111,14 @@ class StoreBuffer {
}
private:
+ // Add pointer to deduplication sets. Returns true if the current set is full
+ // and a new set was created.
+ bool AddPointerInternal(uword address);
+
+ // Check if we run over the max number of deduplication sets.
+ // If we did schedule an interrupt.
+ void CheckThreshold();
+
DedupSet* dedup_sets_;
intptr_t count_;
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/store_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698