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

Unified Diff: src/heap.h

Issue 6745033: On store buffer overflow we mark individidual pages for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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.cc » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 7374)
+++ src/heap.h (working copy)
@@ -35,6 +35,7 @@
#include "spaces.h"
#include "splay-tree-inl.h"
#include "v8-counters.h"
+#include "v8globals.h"
namespace v8 {
namespace internal {
@@ -235,6 +236,19 @@
ObjectSlotCallback copy_object_func);
+class StoreBufferRebuilder : public AllStatic {
+ public:
+ void Callback(MemoryChunk* page, StoreBufferEvent event);
+
+ private:
+ // The fullness of the store buffer when we started to scan the current page.
Vyacheslav Egorov (Chromium) 2011/03/28 15:13:19 I can't grok the comment.
Erik Corry 2011/03/28 15:56:07 Rewritten.
+ Object*** start_of_current_page_;
+ // The current page we are scanning in the store buffer iterator.
+ MemoryChunk* current_page_;
+};
+
+
+
// The all static Heap captures the interface to the global object heap.
// All JavaScript contexts by this process share the same object heap.
@@ -851,11 +865,6 @@
// Iterates over all the other roots in the heap.
static void IterateWeakRoots(ObjectVisitor* v, VisitMode mode);
- enum ExpectedPageWatermarkState {
- WATERMARK_SHOULD_BE_VALID,
- WATERMARK_CAN_BE_INVALID
- };
-
// 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
@@ -866,8 +875,12 @@
static void IteratePointers(
PagedSpace* space,
PointerRegionCallback visit_pointer_region,
+ ObjectSlotCallback callback);
+ static void IteratePointersOnPage(
+ PagedSpace* space,
+ PointerRegionCallback visit_pointer_region,
ObjectSlotCallback callback,
- ExpectedPageWatermarkState expected_page_watermark_state);
+ Page* page);
// Iterate pointers to from semispace of new space found in memory interval
// from start to end.
@@ -955,10 +968,8 @@
// Verify the heap is in its normal state before or after a GC.
static void Verify();
- static void OldPointerSpaceCheckStoreBuffer(
- ExpectedPageWatermarkState watermark_state);
- static void MapSpaceCheckStoreBuffer(
- ExpectedPageWatermarkState watermark_state);
+ static void OldPointerSpaceCheckStoreBuffer();
+ static void MapSpaceCheckStoreBuffer();
static void LargeObjectSpaceCheckStoreBuffer();
// Report heap statistics.
@@ -1065,16 +1076,14 @@
> old_gen_promotion_limit_;
}
- static intptr_t OldGenerationSpaceAvailable() {
+ static inline intptr_t OldGenerationSpaceAvailable() {
return old_gen_allocation_limit_ -
(PromotedSpaceSize() + PromotedExternalMemorySize());
}
// True if we have reached the allocation limit in the old generation that
// should artificially cause a GC right now.
- static bool OldGenerationAllocationLimitReached() {
- return OldGenerationSpaceAvailable() < 0;
- }
+ static inline bool OldGenerationAllocationLimitReached();
// Can be called when the embedding application is idle.
static bool IdleNotification();
@@ -1271,6 +1280,8 @@
static Object* global_contexts_list_;
+ static StoreBufferRebuilder store_buffer_rebuilder_;
+
struct StringTypeTable {
InstanceType type;
int size;
@@ -1382,6 +1393,8 @@
static Address DoScavenge(ObjectVisitor* scavenge_visitor,
Address new_space_front);
+ static void ScavengeStoreBufferCallback(MemoryChunk* page,
+ StoreBufferEvent event);
// Performs a major collection in the whole heap.
static void MarkCompact(GCTracer* tracer);
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698