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

Side by Side Diff: src/heap/mark-compact-inl.h

Issue 1038653003: Change halfway-to-the-max GC trigger to measure committed pages, not allocated objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix thinko Created 5 years, 8 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 | « src/heap/mark-compact.cc ('k') | test/mjsunit/gc-early-with-fragmentation.js » ('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 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_
6 #define V8_HEAP_MARK_COMPACT_INL_H_ 6 #define V8_HEAP_MARK_COMPACT_INL_H_
7 7
8 #include "src/heap/mark-compact.h" 8 #include "src/heap/mark-compact.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 15
16 MarkBit Marking::MarkBitFrom(Address addr) { 16 MarkBit Marking::MarkBitFrom(Address addr) {
17 MemoryChunk* p = MemoryChunk::FromAddress(addr); 17 MemoryChunk* p = MemoryChunk::FromAddress(addr);
18 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr), 18 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr),
19 p->ContainsOnlyData()); 19 p->ContainsOnlyData());
20 } 20 }
21 21
22 22
23 void MarkCompactCollector::SetFlags(int flags) { 23 void MarkCompactCollector::SetFlags(int flags) {
24 reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0); 24 reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0);
25 abort_incremental_marking_ = 25 incremental_marking_abort_requested_ =
26 ((flags & Heap::kAbortIncrementalMarkingMask) != 0); 26 ((flags & Heap::kAbortIncrementalMarkingMask) != 0);
27 } 27 }
28 28
29 29
30 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { 30 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) {
31 DCHECK(Marking::MarkBitFrom(obj) == mark_bit); 31 DCHECK(Marking::MarkBitFrom(obj) == mark_bit);
32 if (!mark_bit.Get()) { 32 if (!mark_bit.Get()) {
33 mark_bit.Set(); 33 mark_bit.Set();
34 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); 34 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
35 DCHECK(IsMarked(obj)); 35 DCHECK(IsMarked(obj));
(...skipping 27 matching lines...) Expand all
63 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_, 63 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_,
64 object_page->slots_buffer_address(), slot, mode)) { 64 object_page->slots_buffer_address(), slot, mode)) {
65 EvictEvacuationCandidate(object_page); 65 EvictEvacuationCandidate(object_page);
66 } 66 }
67 } 67 }
68 } 68 }
69 } 69 }
70 } // namespace v8::internal 70 } // namespace v8::internal
71 71
72 #endif // V8_HEAP_MARK_COMPACT_INL_H_ 72 #endif // V8_HEAP_MARK_COMPACT_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/mjsunit/gc-early-with-fragmentation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698