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

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

Issue 1844413002: Use EmbedderHeapTracer instead of object grouping when trace_embedder_heap flag is set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move logic from heap to mark compact Created 4 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/objects-visiting-inl.h ('k') | src/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/scavenger.h" 5 #include "src/heap/scavenger.h"
6 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/heap/objects-visiting-inl.h" 9 #include "src/heap/objects-visiting-inl.h"
10 #include "src/heap/scavenger-inl.h" 10 #include "src/heap/scavenger-inl.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); 71 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit);
72 72
73 table_.Register(kVisitJSFunction, &EvacuateJSFunction); 73 table_.Register(kVisitJSFunction, &EvacuateJSFunction);
74 74
75 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, 75 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>,
76 kVisitDataObject, kVisitDataObjectGeneric>(); 76 kVisitDataObject, kVisitDataObjectGeneric>();
77 77
78 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, 78 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>,
79 kVisitJSObject, kVisitJSObjectGeneric>(); 79 kVisitJSObject, kVisitJSObjectGeneric>();
80 80
81 table_
82 .RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>,
83 kVisitJSApiObject, kVisitJSApiObjectGeneric>();
84
81 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, 85 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>,
82 kVisitStruct, kVisitStructGeneric>(); 86 kVisitStruct, kVisitStructGeneric>();
83 } 87 }
84 88
85 static VisitorDispatchTable<ScavengingCallback>* GetTable() { 89 static VisitorDispatchTable<ScavengingCallback>* GetTable() {
86 return &table_; 90 return &table_;
87 } 91 }
88 92
89 private: 93 private:
90 enum ObjectContents { DATA_OBJECT, POINTER_OBJECT }; 94 enum ObjectContents { DATA_OBJECT, POINTER_OBJECT };
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 465
462 void ScavengeVisitor::ScavengePointer(Object** p) { 466 void ScavengeVisitor::ScavengePointer(Object** p) {
463 Object* object = *p; 467 Object* object = *p;
464 if (!heap_->InNewSpace(object)) return; 468 if (!heap_->InNewSpace(object)) return;
465 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 469 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
466 reinterpret_cast<HeapObject*>(object)); 470 reinterpret_cast<HeapObject*>(object));
467 } 471 }
468 472
469 } // namespace internal 473 } // namespace internal
470 } // namespace v8 474 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698