| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/freelist.h" | 10 #include "vm/freelist.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace dart { | 24 namespace dart { |
| 25 | 25 |
| 26 DEFINE_FLAG(bool, heap_profile_initialize, false, | 26 DEFINE_FLAG(bool, heap_profile_initialize, false, |
| 27 "Writes a heap profile on isolate initialization."); | 27 "Writes a heap profile on isolate initialization."); |
| 28 DECLARE_FLAG(bool, print_bootstrap); | 28 DECLARE_FLAG(bool, print_bootstrap); |
| 29 DECLARE_FLAG(bool, print_class_table); | 29 DECLARE_FLAG(bool, print_class_table); |
| 30 DECLARE_FLAG(bool, trace_isolates); | 30 DECLARE_FLAG(bool, trace_isolates); |
| 31 | 31 |
| 32 Isolate* Dart::vm_isolate_ = NULL; | 32 Isolate* Dart::vm_isolate_ = NULL; |
| 33 ThreadPool* Dart::thread_pool_ = NULL; | 33 ThreadPool* Dart::thread_pool_ = NULL; |
| 34 void* Dart::perf_events_file_ = NULL; | |
| 35 DebugInfo* Dart::pprof_symbol_generator_ = NULL; | 34 DebugInfo* Dart::pprof_symbol_generator_ = NULL; |
| 36 | 35 |
| 37 // An object visitor which will mark all visited objects. This is used to | 36 // An object visitor which will mark all visited objects. This is used to |
| 38 // premark all objects in the vm_isolate_ heap. | 37 // premark all objects in the vm_isolate_ heap. |
| 39 class PremarkingVisitor : public ObjectVisitor { | 38 class PremarkingVisitor : public ObjectVisitor { |
| 40 public: | 39 public: |
| 41 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} | 40 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} |
| 42 | 41 |
| 43 void VisitObject(RawObject* obj) { | 42 void VisitObject(RawObject* obj) { |
| 44 // RawInstruction objects are premarked on allocation. | 43 // RawInstruction objects are premarked on allocation. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 delete isolate; | 197 delete isolate; |
| 199 | 198 |
| 200 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 199 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 201 if (callback != NULL) { | 200 if (callback != NULL) { |
| 202 (callback)(callback_data); | 201 (callback)(callback_data); |
| 203 } | 202 } |
| 204 } | 203 } |
| 205 | 204 |
| 206 | 205 |
| 207 } // namespace dart | 206 } // namespace dart |
| OLD | NEW |