OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/cpu.h" | 8 #include "vm/cpu.h" |
9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
11 #include "vm/debugger.h" | 11 #include "vm/debugger.h" |
12 #include "vm/flags.h" | 12 #include "vm/flags.h" |
13 #include "vm/freelist.h" | 13 #include "vm/freelist.h" |
14 #include "vm/handles.h" | 14 #include "vm/handles.h" |
15 #include "vm/heap.h" | 15 #include "vm/heap.h" |
16 #include "vm/isolate.h" | 16 #include "vm/isolate.h" |
17 #include "vm/metrics.h" | 17 #include "vm/metrics.h" |
18 #include "vm/object.h" | 18 #include "vm/object.h" |
19 #include "vm/object_store.h" | 19 #include "vm/object_store.h" |
20 #include "vm/object_id_ring.h" | 20 #include "vm/object_id_ring.h" |
21 #include "vm/port.h" | 21 #include "vm/port.h" |
22 #include "vm/profiler.h" | 22 #include "vm/profiler.h" |
23 #include "vm/service_isolate.h" | 23 #include "vm/service_isolate.h" |
24 #include "vm/simulator.h" | 24 #include "vm/simulator.h" |
25 #include "vm/snapshot.h" | 25 #include "vm/snapshot.h" |
26 #include "vm/stub_code.h" | 26 #include "vm/stub_code.h" |
27 #include "vm/symbols.h" | 27 #include "vm/symbols.h" |
28 #include "vm/thread_interrupter.h" | 28 #include "vm/thread_interrupter.h" |
29 #include "vm/thread_pool.h" | 29 #include "vm/thread_pool.h" |
| 30 #include "vm/timeline.h" |
30 #include "vm/virtual_memory.h" | 31 #include "vm/virtual_memory.h" |
31 #include "vm/zone.h" | 32 #include "vm/zone.h" |
32 | 33 |
33 namespace dart { | 34 namespace dart { |
34 | 35 |
35 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32, | 36 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32, |
36 "Max size of new gen semi space in MB"); | 37 "Max size of new gen semi space in MB"); |
37 DEFINE_FLAG(int, old_gen_heap_size, 0, | 38 DEFINE_FLAG(int, old_gen_heap_size, 0, |
38 "Max size of old gen heap size in MB, or 0 for unlimited," | 39 "Max size of old gen heap size in MB, or 0 for unlimited," |
39 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap"); | 40 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap"); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ServiceIsolate::SendIsolateStartupMessage(); | 318 ServiceIsolate::SendIsolateStartupMessage(); |
318 isolate->debugger()->NotifyIsolateCreated(); | 319 isolate->debugger()->NotifyIsolateCreated(); |
319 | 320 |
320 // Create tag table. | 321 // Create tag table. |
321 isolate->set_tag_table( | 322 isolate->set_tag_table( |
322 GrowableObjectArray::Handle(GrowableObjectArray::New())); | 323 GrowableObjectArray::Handle(GrowableObjectArray::New())); |
323 // Set up default UserTag. | 324 // Set up default UserTag. |
324 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); | 325 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); |
325 isolate->set_current_tag(default_tag); | 326 isolate->set_current_tag(default_tag); |
326 | 327 |
| 328 isolate->SetTimelineEventBuffer(new TimelineEventBuffer()); |
| 329 |
327 if (FLAG_keep_code) { | 330 if (FLAG_keep_code) { |
328 isolate->set_deoptimized_code_array( | 331 isolate->set_deoptimized_code_array( |
329 GrowableObjectArray::Handle(GrowableObjectArray::New())); | 332 GrowableObjectArray::Handle(GrowableObjectArray::New())); |
330 } | 333 } |
331 return Error::null(); | 334 return Error::null(); |
332 } | 335 } |
333 | 336 |
334 | 337 |
335 void Dart::RunShutdownCallback() { | 338 void Dart::RunShutdownCallback() { |
336 Isolate* isolate = Isolate::Current(); | 339 Isolate* isolate = Isolate::Current(); |
(...skipping 19 matching lines...) Expand all Loading... |
356 return predefined_handles_->handles_.AllocateScopedHandle(); | 359 return predefined_handles_->handles_.AllocateScopedHandle(); |
357 } | 360 } |
358 | 361 |
359 | 362 |
360 bool Dart::IsReadOnlyHandle(uword address) { | 363 bool Dart::IsReadOnlyHandle(uword address) { |
361 ASSERT(predefined_handles_ != NULL); | 364 ASSERT(predefined_handles_ != NULL); |
362 return predefined_handles_->handles_.IsValidScopedHandle(address); | 365 return predefined_handles_->handles_.IsValidScopedHandle(address); |
363 } | 366 } |
364 | 367 |
365 } // namespace dart | 368 } // namespace dart |
OLD | NEW |