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

Side by Side Diff: runtime/vm/gc_marker.cc

Issue 253493002: - Account for live size in marker. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/gc_marker.h ('k') | runtime/vm/gc_sweeper.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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/gc_marker.h" 5 #include "vm/gc_marker.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // epilog callback. 411 // epilog callback.
412 } 412 }
413 413
414 414
415 void GCMarker::DrainMarkingStack(Isolate* isolate, 415 void GCMarker::DrainMarkingStack(Isolate* isolate,
416 MarkingVisitor* visitor) { 416 MarkingVisitor* visitor) {
417 while (!visitor->marking_stack()->IsEmpty()) { 417 while (!visitor->marking_stack()->IsEmpty()) {
418 RawObject* raw_obj = visitor->marking_stack()->Pop(); 418 RawObject* raw_obj = visitor->marking_stack()->Pop();
419 visitor->VisitingOldObject(raw_obj); 419 visitor->VisitingOldObject(raw_obj);
420 if (raw_obj->GetClassId() != kWeakPropertyCid) { 420 if (raw_obj->GetClassId() != kWeakPropertyCid) {
421 raw_obj->VisitPointers(visitor); 421 marked_bytes_ += raw_obj->VisitPointers(visitor);
422 } else { 422 } else {
423 RawWeakProperty* raw_weak = reinterpret_cast<RawWeakProperty*>(raw_obj); 423 RawWeakProperty* raw_weak = reinterpret_cast<RawWeakProperty*>(raw_obj);
424 marked_bytes_ += raw_weak->Size();
424 ProcessWeakProperty(raw_weak, visitor); 425 ProcessWeakProperty(raw_weak, visitor);
425 } 426 }
426 } 427 }
427 visitor->VisitingOldObject(NULL); 428 visitor->VisitingOldObject(NULL);
428 } 429 }
429 430
430 431
431 void GCMarker::ProcessWeakProperty(RawWeakProperty* raw_weak, 432 void GCMarker::ProcessWeakProperty(RawWeakProperty* raw_weak,
432 MarkingVisitor* visitor) { 433 MarkingVisitor* visitor) {
433 // The fate of the weak property is determined by its key. 434 // The fate of the weak property is determined by its key.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 MarkingWeakVisitor mark_weak; 507 MarkingWeakVisitor mark_weak;
507 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); 508 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
508 mark.Finalize(); 509 mark.Finalize();
509 ProcessWeakTables(page_space); 510 ProcessWeakTables(page_space);
510 ProcessObjectIdTable(isolate); 511 ProcessObjectIdTable(isolate);
511 512
512 Epilogue(isolate, invoke_api_callbacks); 513 Epilogue(isolate, invoke_api_callbacks);
513 } 514 }
514 515
515 } // namespace dart 516 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.h ('k') | runtime/vm/gc_sweeper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698