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

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

Issue 2626343002: 1. Added new flag verify_gc_contains and moved all the asserts that do a (Closed)
Patch Set: Created 3 years, 11 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 | « runtime/vm/flag_list.h ('k') | runtime/vm/heap.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 "vm/allocation.h" 7 #include "vm/allocation.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 void VisitingOldObject(RawObject* obj) { 300 void VisitingOldObject(RawObject* obj) {
301 ASSERT((obj == NULL) || obj->IsOldObject()); 301 ASSERT((obj == NULL) || obj->IsOldObject());
302 visiting_old_object_ = obj; 302 visiting_old_object_ = obj;
303 } 303 }
304 304
305 private: 305 private:
306 void PushMarked(RawObject* raw_obj) { 306 void PushMarked(RawObject* raw_obj) {
307 ASSERT(raw_obj->IsHeapObject()); 307 ASSERT(raw_obj->IsHeapObject());
308 ASSERT((FLAG_verify_before_gc || FLAG_verify_before_gc) 308 ASSERT((FLAG_verify_gc_contains)
309 ? page_space_->Contains(RawObject::ToAddr(raw_obj)) 309 ? page_space_->Contains(RawObject::ToAddr(raw_obj))
310 : true); 310 : true);
311 311
312 // Push the marked object on the marking stack. 312 // Push the marked object on the marking stack.
313 ASSERT(raw_obj->IsMarked()); 313 ASSERT(raw_obj->IsMarked());
314 // We acquired the mark bit => no other task is modifying the header. 314 // We acquired the mark bit => no other task is modifying the header.
315 // TODO(koda): For concurrent mutator, this needs synchronization. Consider 315 // TODO(koda): For concurrent mutator, this needs synchronization. Consider
316 // clearing these bits already in the CAS for the mark bit. 316 // clearing these bits already in the CAS for the mark bit.
317 raw_obj->ClearRememberedBitUnsynchronized(); 317 raw_obj->ClearRememberedBitUnsynchronized();
318 work_list_.Push(raw_obj); 318 work_list_.Push(raw_obj);
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 // Phase 3: Finalize results from all markers (detach code, etc.). 783 // Phase 3: Finalize results from all markers (detach code, etc.).
784 barrier.Exit(); 784 barrier.Exit();
785 } 785 }
786 ProcessWeakTables(page_space); 786 ProcessWeakTables(page_space);
787 ProcessObjectIdTable(isolate); 787 ProcessObjectIdTable(isolate);
788 } 788 }
789 Epilogue(isolate, invoke_api_callbacks); 789 Epilogue(isolate, invoke_api_callbacks);
790 } 790 }
791 791
792 } // namespace dart 792 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698