| 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/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 // Initialize metrics. | 783 // Initialize metrics. |
| 784 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \ | 784 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \ |
| 785 result->metric_##variable##_.Init(result, name, NULL, Metric::unit); | 785 result->metric_##variable##_.Init(result, name, NULL, Metric::unit); |
| 786 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT); | 786 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT); |
| 787 #undef ISOLATE_METRIC_INIT | 787 #undef ISOLATE_METRIC_INIT |
| 788 | 788 |
| 789 // Initialize Timeline streams. | 789 // Initialize Timeline streams. |
| 790 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default) \ | 790 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default) \ |
| 791 result->stream_##name##_.Init(#name, \ | 791 result->stream_##name##_.Init(#name, \ |
| 792 Timeline::EnableStreamByDefault(#name) || \ | 792 Timeline::EnableStreamByDefault(#name) || \ |
| 793 enabled_by_default); | 793 enabled_by_default, \ |
| 794 Timeline::Stream##name##EnabledFlag()); |
| 794 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT); | 795 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT); |
| 795 #undef ISOLATE_TIMELINE_STREAM_INIT | 796 #undef ISOLATE_TIMELINE_STREAM_INIT |
| 796 | 797 |
| 797 Heap::Init(result, | 798 Heap::Init(result, |
| 798 is_vm_isolate | 799 is_vm_isolate |
| 799 ? 0 // New gen size 0; VM isolate should only allocate in old. | 800 ? 0 // New gen size 0; VM isolate should only allocate in old. |
| 800 : FLAG_new_gen_semi_max_size * MBInWords, | 801 : FLAG_new_gen_semi_max_size * MBInWords, |
| 801 FLAG_old_gen_heap_size * MBInWords, | 802 FLAG_old_gen_heap_size * MBInWords, |
| 802 FLAG_external_max_size * MBInWords); | 803 FLAG_external_max_size * MBInWords); |
| 803 | 804 |
| (...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 serialized_message_, serialized_message_len_); | 2494 serialized_message_, serialized_message_len_); |
| 2494 } | 2495 } |
| 2495 | 2496 |
| 2496 | 2497 |
| 2497 void IsolateSpawnState::Cleanup() { | 2498 void IsolateSpawnState::Cleanup() { |
| 2498 SwitchIsolateScope switch_scope(I); | 2499 SwitchIsolateScope switch_scope(I); |
| 2499 Dart::ShutdownIsolate(); | 2500 Dart::ShutdownIsolate(); |
| 2500 } | 2501 } |
| 2501 | 2502 |
| 2502 } // namespace dart | 2503 } // namespace dart |
| OLD | NEW |