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

Unified Diff: src/incremental-marking.cc

Issue 15745004: Fix counting of scanned bytes in incremental marking step for large object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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') | test/cctest/test-heap.cc » ('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 bacbb93ad2e8cb6a335c577e8ccf69ade8c82d63..e19d6e28f69f9141b3d47756bcf2d3129a9a6eaf 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -54,7 +54,8 @@ IncrementalMarking::IncrementalMarking(Heap* heap)
should_hurry_(false),
marking_speed_(0),
allocated_(0),
- no_marking_scope_depth_(0) {
+ no_marking_scope_depth_(0),
+ unscanned_bytes_of_large_object_(0) {
}
@@ -241,6 +242,7 @@ class IncrementalMarkingMarkingVisitor
chunk->progress_bar());
int end_offset = Min(object_size,
start_offset + kProgressBarScanningChunk);
+ int already_scanned_offset = start_offset;
bool scan_until_end = false;
do {
VisitPointersWithAnchor(heap,
@@ -254,6 +256,8 @@ class IncrementalMarkingMarkingVisitor
chunk->set_progress_bar(start_offset);
if (start_offset < object_size) {
heap->incremental_marking()->marking_deque()->UnshiftGrey(object);
+ heap->incremental_marking()->NotifyIncompleteScanOfObject(
+ object_size - (start_offset - already_scanned_offset));
}
} else {
FixedArrayVisitor::Visit(map, object);
@@ -739,8 +743,9 @@ void IncrementalMarking::ProcessMarkingDeque(intptr_t bytes_to_process) {
if (map == filler_map) continue;
int size = obj->SizeFromMap(map);
- bytes_to_process -= size;
+ unscanned_bytes_of_large_object_ = 0;
VisitObject(map, obj, size);
+ bytes_to_process -= (size - unscanned_bytes_of_large_object_);
}
}
« no previous file with comments | « src/incremental-marking.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698