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

Unified Diff: src/heap/heap.cc

Issue 1964143004: Fix live bytes counter in large object space after right trimming. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index afdc7bb4cd397d69625ecdca09c295a668e0a6ae..b8a9b7a50cd287b88b62fe32367b57559ec3c4d4 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3078,9 +3078,11 @@ void Heap::AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode) {
// the heap using HeapIterator, we can update the live byte count. We cannot
// update while using HeapIterator because the iterator is temporarily
// marking the whole object graph, without updating live bytes.
- if (!in_heap_iterator() &&
- !mark_compact_collector()->sweeping_in_progress() &&
- Marking::IsBlack(Marking::MarkBitFrom(object->address()))) {
+ if (lo_space()->Contains(object)) {
+ lo_space()->AdjustLiveBytes(by);
+ } else if (!in_heap_iterator() &&
+ !mark_compact_collector()->sweeping_in_progress() &&
+ Marking::IsBlack(Marking::MarkBitFrom(object->address()))) {
if (mode == SEQUENTIAL_TO_SWEEPER) {
MemoryChunk::IncrementLiveBytesFromGC(object, by);
} else {
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698