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

Unified Diff: src/incremental-marking-inl.h

Issue 11410080: Forward transition objects to grey if they are referenced by a large object (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking-inl.h
diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h
index bbe9a9d209b36cca76360b2f9b091b755dc0587a..dcac917e8c547742b090ff4d0665b0fea2d86f97 100644
--- a/src/incremental-marking-inl.h
+++ b/src/incremental-marking-inl.h
@@ -37,14 +37,20 @@ namespace internal {
bool IncrementalMarking::BaseRecordWrite(HeapObject* obj,
Object** slot,
Object* value) {
- MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value));
+ HeapObject* value_heap_obj = HeapObject::cast(value);
+ MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
if (Marking::IsWhite(value_bit)) {
MarkBit obj_bit = Marking::MarkBitFrom(obj);
if (Marking::IsBlack(obj_bit)) {
- BlackToGreyAndUnshift(obj, obj_bit);
+ // TODO(hpayer): make decision based on if object has a progress bar
+ const int kLargeObjectSize = 1024 * 1024;
+ if (obj->Size() > kLargeObjectSize) {
+ WhiteToGreyAndPush(value_heap_obj, value_bit);
+ } else {
+ BlackToGreyAndUnshift(obj, obj_bit);
+ }
RestartIfNotMarking();
}
-
// Object is either grey or white. It will be scanned if survives.
return false;
Michael Starzinger 2012/11/14 08:42:24 This will prevent the slot from being recorded whe
payer 2012/11/14 09:12:37 Done.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698