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

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

Issue 2245133004: [heap] Add basic infrastructure for incremental wrapper tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comment Created 4 years, 4 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/flag-definitions.h ('k') | src/heap/incremental-marking.cc » ('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/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after
5447 5447
5448 bool Heap::UsingEmbedderHeapTracer() { 5448 bool Heap::UsingEmbedderHeapTracer() {
5449 return mark_compact_collector()->UsingEmbedderHeapTracer(); 5449 return mark_compact_collector()->UsingEmbedderHeapTracer();
5450 } 5450 }
5451 5451
5452 void Heap::TracePossibleWrapper(JSObject* js_object) { 5452 void Heap::TracePossibleWrapper(JSObject* js_object) {
5453 mark_compact_collector()->TracePossibleWrapper(js_object); 5453 mark_compact_collector()->TracePossibleWrapper(js_object);
5454 } 5454 }
5455 5455
5456 void Heap::RegisterExternallyReferencedObject(Object** object) { 5456 void Heap::RegisterExternallyReferencedObject(Object** object) {
5457 mark_compact_collector()->RegisterExternallyReferencedObject(object); 5457 HeapObject* heap_object = HeapObject::cast(*object);
5458 DCHECK(Contains(heap_object));
5459 if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) {
5460 IncrementalMarking::MarkGrey(this, heap_object);
5461 } else {
5462 DCHECK(mark_compact_collector()->in_use());
5463 MarkBit mark_bit = ObjectMarking::MarkBitFrom(heap_object);
5464 mark_compact_collector()->MarkObject(heap_object, mark_bit);
5465 }
5458 } 5466 }
5459 5467
5460 void Heap::TearDown() { 5468 void Heap::TearDown() {
5461 #ifdef VERIFY_HEAP 5469 #ifdef VERIFY_HEAP
5462 if (FLAG_verify_heap) { 5470 if (FLAG_verify_heap) {
5463 Verify(); 5471 Verify();
5464 } 5472 }
5465 #endif 5473 #endif
5466 5474
5467 UpdateMaximumCommitted(); 5475 UpdateMaximumCommitted();
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
6486 } 6494 }
6487 6495
6488 6496
6489 // static 6497 // static
6490 int Heap::GetStaticVisitorIdForMap(Map* map) { 6498 int Heap::GetStaticVisitorIdForMap(Map* map) {
6491 return StaticVisitorBase::GetVisitorId(map); 6499 return StaticVisitorBase::GetVisitorId(map);
6492 } 6500 }
6493 6501
6494 } // namespace internal 6502 } // namespace internal
6495 } // namespace v8 6503 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698