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

Unified Diff: runtime/vm/store_buffer.h

Issue 10702067: - Separate store buffer data in the isolate into the StoreBufferBlock and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
Index: runtime/vm/store_buffer.h
===================================================================
--- runtime/vm/store_buffer.h (revision 9305)
+++ runtime/vm/store_buffer.h (working copy)
@@ -7,6 +7,7 @@
#include "platform/assert.h"
#include "vm/globals.h"
+#include "vm/hash_set.h"
namespace dart {
@@ -40,8 +41,44 @@
private:
int32_t top_;
uword pointers_[kSize];
+
+ friend class StoreBuffer;
};
+
+class StoreBuffer {
+ public:
+ StoreBuffer() : dedup_sets_(new DedupSet()) {}
+ ~StoreBuffer();
+
+ void AddPointer(uword address);
+
+ void ProcessBlock(StoreBufferBlock* block);
+
+ private:
+ // Simple linked list element containing a HashSet of old->new pointers.
+ class DedupSet {
+ public:
+ enum {
+ kSetSize = 1024,
+ kFillRatio = 80
+ };
+
+ DedupSet() : set_(new HashSet(kSetSize, kFillRatio)) {}
siva 2012/07/02 20:57:42 : next_(NULL) {}
Ivan Posva 2012/07/03 00:10:24 Done.
+ ~DedupSet() {
+ delete set_;
+ }
+
+ DedupSet* next_;
+ HashSet* set_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DedupSet);
+ };
+
+ DedupSet* dedup_sets_;
+};
+
} // namespace dart
#endif // VM_STORE_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698