| OLD | NEW |
| 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 |
| 11 #include "vm/allocation.h" | 11 #include "vm/allocation.h" |
| 12 #include "vm/dart_api_state.h" | 12 #include "vm/dart_api_state.h" |
| 13 #include "vm/isolate.h" | 13 #include "vm/isolate.h" |
| 14 #include "vm/log.h" | 14 #include "vm/log.h" |
| 15 #include "vm/pages.h" | 15 #include "vm/pages.h" |
| 16 #include "vm/raw_object.h" | 16 #include "vm/raw_object.h" |
| 17 #include "vm/stack_frame.h" | 17 #include "vm/stack_frame.h" |
| 18 #include "vm/store_buffer.h" | 18 #include "vm/store_buffer.h" |
| 19 #include "vm/thread_barrier.h" | 19 #include "vm/thread_barrier.h" |
| 20 #include "vm/thread_pool.h" | 20 #include "vm/thread_pool.h" |
| 21 #include "vm/thread_registry.h" | 21 #include "vm/thread_registry.h" |
| 22 #include "vm/timeline.h" | 22 #include "vm/timeline.h" |
| 23 #include "vm/visitor.h" | 23 #include "vm/visitor.h" |
| 24 #include "vm/object_id_ring.h" | 24 #include "vm/object_id_ring.h" |
| 25 | 25 |
| 26 namespace dart { | 26 namespace dart { |
| 27 | 27 |
| 28 DEFINE_FLAG(int, marker_tasks, 2, | |
| 29 "The number of tasks to spawn during old gen GC marking (0 means " | |
| 30 "perform all marking on main thread)."); | |
| 31 DEFINE_FLAG(bool, log_marker_tasks, false, | |
| 32 "Log debugging information for old gen GC marking tasks."); | |
| 33 | |
| 34 class DelaySet { | 28 class DelaySet { |
| 35 private: | 29 private: |
| 36 typedef std::multimap<RawObject*, RawWeakProperty*> Map; | 30 typedef std::multimap<RawObject*, RawWeakProperty*> Map; |
| 37 typedef std::pair<RawObject*, RawWeakProperty*> MapEntry; | 31 typedef std::pair<RawObject*, RawWeakProperty*> MapEntry; |
| 38 | 32 |
| 39 public: | 33 public: |
| 40 DelaySet() : mutex_(new Mutex()) {} | 34 DelaySet() : mutex_(new Mutex()) {} |
| 41 ~DelaySet() { delete mutex_; } | 35 ~DelaySet() { delete mutex_; } |
| 42 | 36 |
| 43 // After atomically setting the watched bit on a white key (see | 37 // After atomically setting the watched bit on a white key (see |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 barrier.Exit(); | 745 barrier.Exit(); |
| 752 } | 746 } |
| 753 delay_set.ClearReferences(); | 747 delay_set.ClearReferences(); |
| 754 ProcessWeakTables(page_space); | 748 ProcessWeakTables(page_space); |
| 755 ProcessObjectIdTable(isolate); | 749 ProcessObjectIdTable(isolate); |
| 756 } | 750 } |
| 757 Epilogue(isolate, invoke_api_callbacks); | 751 Epilogue(isolate, invoke_api_callbacks); |
| 758 } | 752 } |
| 759 | 753 |
| 760 } // namespace dart | 754 } // namespace dart |
| OLD | NEW |