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

Unified Diff: src/incremental-marking.h

Issue 11035053: Rollback trunk to bleeding_edge revision 12525 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 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 | « src/ic-inl.h ('k') | src/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.h
diff --git a/src/incremental-marking.h b/src/incremental-marking.h
index 1a86fcd44731d509a510c1ccfd8106eed844882e..528ff37f83177fcd9ce60e8e844ae2a843f864e1 100644
--- a/src/incremental-marking.h
+++ b/src/incremental-marking.h
@@ -95,23 +95,21 @@ class IncrementalMarking {
// progress in the face of the mutator creating new work for it. We start
// of at a moderate rate of work and gradually increase the speed of the
// incremental marker until it completes.
- // Do some marking every time this much memory has been allocated or that many
- // heavy (color-checking) write barriers have been invoked.
+ // Do some marking every time this much memory has been allocated.
static const intptr_t kAllocatedThreshold = 65536;
- static const intptr_t kWriteBarriersInvokedThreshold = 65536;
// Start off by marking this many times more memory than has been allocated.
- static const intptr_t kInitialMarkingSpeed = 1;
+ static const intptr_t kInitialAllocationMarkingFactor = 1;
// But if we are promoting a lot of data we need to mark faster to keep up
// with the data that is entering the old space through promotion.
static const intptr_t kFastMarking = 3;
// After this many steps we increase the marking/allocating factor.
- static const intptr_t kMarkingSpeedAccellerationInterval = 1024;
+ static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024;
// This is how much we increase the marking/allocating factor by.
- static const intptr_t kMarkingSpeedAccelleration = 2;
- static const intptr_t kMaxMarkingSpeed = 1000;
+ static const intptr_t kAllocationMarkingFactorSpeedup = 2;
+ static const intptr_t kMaxAllocationMarkingFactor = 1000;
void OldSpaceStep(intptr_t allocated) {
- Step(allocated * kFastMarking / kInitialMarkingSpeed,
+ Step(allocated * kFastMarking / kInitialAllocationMarkingFactor,
GC_VIA_STACK_GUARD);
}
@@ -138,7 +136,7 @@ class IncrementalMarking {
// guaranteed to be rescanned or not guaranteed to survive.
//
// No slots in white objects should be recorded, as some slots are typed and
- // cannot be interpreted correctly if the underlying object does not survive
+ // cannot be interpreted corrrectly if the underlying object does not survive
// the incremental cycle (stays white).
INLINE(bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value));
INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value));
@@ -177,6 +175,16 @@ class IncrementalMarking {
return true;
}
+ // Marks the object grey and pushes it on the marking stack.
+ // Returns true if object needed marking and false otherwise.
+ // This is for incremental marking only.
+ INLINE(bool MarkObjectAndPush(HeapObject* obj));
+
+ // Marks the object black without pushing it on the marking stack.
+ // Returns true if object needed marking and false otherwise.
+ // This is for incremental marking only.
+ INLINE(bool MarkObjectWithoutPush(HeapObject* obj));
+
inline int steps_count() {
return steps_count_;
}
@@ -213,13 +221,13 @@ class IncrementalMarking {
void NotifyOfHighPromotionRate() {
if (IsMarking()) {
- if (marking_speed_ < kFastMarking) {
+ if (allocation_marking_factor_ < kFastMarking) {
if (FLAG_trace_gc) {
PrintPID("Increasing marking speed to %d "
"due to high promotion rate\n",
static_cast<int>(kFastMarking));
}
- marking_speed_ = kFastMarking;
+ allocation_marking_factor_ = kFastMarking;
}
}
}
@@ -267,6 +275,7 @@ class IncrementalMarking {
VirtualMemory* marking_deque_memory_;
bool marking_deque_memory_committed_;
MarkingDeque marking_deque_;
+ Marker<IncrementalMarking> marker_;
int steps_count_;
double steps_took_;
@@ -277,10 +286,9 @@ class IncrementalMarking {
double steps_took_since_last_gc_;
int64_t bytes_rescanned_;
bool should_hurry_;
- int marking_speed_;
+ int allocation_marking_factor_;
intptr_t bytes_scanned_;
intptr_t allocated_;
- intptr_t write_barriers_invoked_since_last_step_;
int no_marking_scope_depth_;
« no previous file with comments | « src/ic-inl.h ('k') | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698