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

Unified Diff: src/incremental-marking.cc

Issue 7970009: Merged from GC branch to bleeding_edge (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated test expectations. More passes, but not all. Created 9 years, 3 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/incremental-marking.h ('k') | src/incremental-marking-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index bdcfe91bd6199d7a1173ac4952c3510a94b34eb9..926f9ae0602edcfb6b77d4d45d3ea24186ddfc28 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -403,7 +403,12 @@ void IncrementalMarking::Start() {
static void MarkObjectGreyDoNotEnqueue(Object* obj) {
if (obj->IsHeapObject()) {
+ HeapObject* heap_obj = HeapObject::cast(obj);
MarkBit mark_bit = Marking::MarkBitFrom(HeapObject::cast(obj));
+ if (Marking::IsBlack(mark_bit)) {
+ MemoryChunk::IncrementLiveBytes(heap_obj->address(),
+ -heap_obj->Size());
+ }
Marking::AnyToGrey(mark_bit);
}
}
@@ -569,14 +574,20 @@ void IncrementalMarking::Hurry() {
}
if (FLAG_cleanup_code_caches_at_gc) {
- Marking::GreyToBlack(Marking::MarkBitFrom(heap_->polymorphic_code_cache()));
+ PolymorphicCodeCache* poly_cache = heap_->polymorphic_code_cache();
+ Marking::GreyToBlack(Marking::MarkBitFrom(poly_cache));
+ MemoryChunk::IncrementLiveBytes(poly_cache->address(),
+ PolymorphicCodeCache::kSize);
}
Object* context = heap_->global_contexts_list();
while (!context->IsUndefined()) {
NormalizedMapCache* cache = Context::cast(context)->normalized_map_cache();
MarkBit mark_bit = Marking::MarkBitFrom(cache);
- if (Marking::IsGrey(mark_bit)) Marking::GreyToBlack(mark_bit);
+ if (Marking::IsGrey(mark_bit)) {
+ Marking::GreyToBlack(mark_bit);
+ MemoryChunk::IncrementLiveBytes(cache->address(), cache->Size());
+ }
context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK);
}
}
« no previous file with comments | « src/incremental-marking.h ('k') | src/incremental-marking-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698