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

Side by Side Diff: src/heap/heap.cc

Issue 1977883002: Version 5.1.281.35 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
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 unified diff | Download patch
« no previous file with comments | « include/v8-version.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 // pages is set after sweeping all pages. 3131 // pages is set after sweeping all pages.
3132 return !InOldSpace(object) || page->SweepingDone(); 3132 return !InOldSpace(object) || page->SweepingDone();
3133 } 3133 }
3134 3134
3135 3135
3136 void Heap::AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode) { 3136 void Heap::AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode) {
3137 // As long as the inspected object is black and we are currently not iterating 3137 // As long as the inspected object is black and we are currently not iterating
3138 // the heap using HeapIterator, we can update the live byte count. We cannot 3138 // the heap using HeapIterator, we can update the live byte count. We cannot
3139 // update while using HeapIterator because the iterator is temporarily 3139 // update while using HeapIterator because the iterator is temporarily
3140 // marking the whole object graph, without updating live bytes. 3140 // marking the whole object graph, without updating live bytes.
3141 if (!in_heap_iterator() && 3141 if (lo_space()->Contains(object)) {
3142 !mark_compact_collector()->sweeping_in_progress() && 3142 lo_space()->AdjustLiveBytes(by);
3143 Marking::IsBlack(Marking::MarkBitFrom(object->address()))) { 3143 } else if (!in_heap_iterator() &&
3144 !mark_compact_collector()->sweeping_in_progress() &&
3145 Marking::IsBlack(Marking::MarkBitFrom(object->address()))) {
3144 if (mode == SEQUENTIAL_TO_SWEEPER) { 3146 if (mode == SEQUENTIAL_TO_SWEEPER) {
3145 MemoryChunk::IncrementLiveBytesFromGC(object, by); 3147 MemoryChunk::IncrementLiveBytesFromGC(object, by);
3146 } else { 3148 } else {
3147 MemoryChunk::IncrementLiveBytesFromMutator(object, by); 3149 MemoryChunk::IncrementLiveBytesFromMutator(object, by);
3148 } 3150 }
3149 } 3151 }
3150 } 3152 }
3151 3153
3152 3154
3153 FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, 3155 FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
6470 } 6472 }
6471 6473
6472 6474
6473 // static 6475 // static
6474 int Heap::GetStaticVisitorIdForMap(Map* map) { 6476 int Heap::GetStaticVisitorIdForMap(Map* map) {
6475 return StaticVisitorBase::GetVisitorId(map); 6477 return StaticVisitorBase::GetVisitorId(map);
6476 } 6478 }
6477 6479
6478 } // namespace internal 6480 } // namespace internal
6479 } // namespace v8 6481 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698