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

Unified Diff: src/store-buffer.h

Issue 7247004: Make the store buffer smaller and handle store buffer (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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
« no previous file with comments | « no previous file | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/store-buffer.h
===================================================================
--- src/store-buffer.h (revision 8396)
+++ src/store-buffer.h (working copy)
@@ -41,8 +41,11 @@
typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to);
-typedef void (StoreBuffer::*RegionCallback)(
- Address start, Address end, ObjectSlotCallback slot_callback);
+typedef void RegionCallback(
+ StoreBuffer* store_buffer,
+ Address start,
+ Address end,
+ ObjectSlotCallback slot_callback);
// Used to implement the write barrier by collecting addresses of pointers
// between spaces.
@@ -81,7 +84,7 @@
// surviving old-to-new pointers into the store buffer to rebuild it.
void IteratePointersToNewSpace(ObjectSlotCallback callback);
- static const int kStoreBufferOverflowBit = 1 << 16;
+ static const int kStoreBufferOverflowBit = 1 << 12;
static const int kStoreBufferSize = kStoreBufferOverflowBit;
static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address);
static const int kOldStoreBufferLength = kStoreBufferLength * 64;
@@ -154,10 +157,31 @@
bool HashTablesAreZapped();
void ExemptPopularPages(int prime_sample_step, int threshold);
- void FindPointersToNewSpaceInRegion(Address start,
- Address end,
- ObjectSlotCallback slot_callback);
+ enum RecordNewSpacePointers {
+ kDontRecord,
+ kRecord
+ };
+ template<RecordNewSpacePointers record>
+ inline void FindPointersToNewSpaceInRegion(Address start,
+ Address end,
+ ObjectSlotCallback slot_callback);
+
+ // It seems gcc doesn't want to take the address of a templated method,
+ // so we create a new method so that we can give the address. Also,
+ // pointers to methods tend to have gnarly implementations.
+ static void FindPointersToNewSpaceInRegionRecord(
+ StoreBuffer* store_buffer,
+ Address start,
+ Address end,
+ ObjectSlotCallback slot_callback);
+
+ static void FindPointersToNewSpaceInRegionDontRecord(
+ StoreBuffer* store_buffer,
+ Address start,
+ Address end,
+ ObjectSlotCallback slot_callback);
+
// For each region of pointers on a page in use from an old space call
// visit_pointer_region callback.
// If either visit_pointer_region or callback can cause an allocation
@@ -174,7 +198,8 @@
Address end,
ObjectSlotCallback slot_callback);
- void FindPointersToNewSpaceInMapsRegion(
+ static void FindPointersToNewSpaceInMapsRegion(
+ StoreBuffer* store_buffer,
Address start,
Address end,
ObjectSlotCallback slot_callback);
« no previous file with comments | « no previous file | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698