| 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 | 857 |
| 858 // Initialize metrics. | 858 // Initialize metrics. |
| 859 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \ | 859 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \ |
| 860 result->metric_##variable##_.Init(result, name, NULL, Metric::unit); | 860 result->metric_##variable##_.Init(result, name, NULL, Metric::unit); |
| 861 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT); | 861 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT); |
| 862 #undef ISOLATE_METRIC_INIT | 862 #undef ISOLATE_METRIC_INIT |
| 863 | 863 |
| 864 // Initialize Timeline streams. | 864 // Initialize Timeline streams. |
| 865 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default) \ | 865 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default) \ |
| 866 result->stream_##name##_.Init(#name, \ | 866 result->stream_##name##_.Init(#name, \ |
| 867 Timeline::EnableStreamByDefault(#name) || \ | |
| 868 enabled_by_default, \ | 867 enabled_by_default, \ |
| 869 Timeline::Stream##name##EnabledFlag()); | 868 Timeline::Stream##name##EnabledFlag()); |
| 870 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT); | 869 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT); |
| 871 #undef ISOLATE_TIMELINE_STREAM_INIT | 870 #undef ISOLATE_TIMELINE_STREAM_INIT |
| 872 | 871 |
| 873 Heap::Init(result, | 872 Heap::Init(result, |
| 874 is_vm_isolate | 873 is_vm_isolate |
| 875 ? 0 // New gen size 0; VM isolate should only allocate in old. | 874 ? 0 // New gen size 0; VM isolate should only allocate in old. |
| 876 : FLAG_new_gen_semi_max_size * MBInWords, | 875 : FLAG_new_gen_semi_max_size * MBInWords, |
| 877 FLAG_old_gen_heap_size * MBInWords, | 876 FLAG_old_gen_heap_size * MBInWords, |
| (...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 } | 2530 } |
| 2532 | 2531 |
| 2533 | 2532 |
| 2534 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { | 2533 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { |
| 2535 return DeserializeObject(thread, | 2534 return DeserializeObject(thread, |
| 2536 serialized_message_, serialized_message_len_); | 2535 serialized_message_, serialized_message_len_); |
| 2537 } | 2536 } |
| 2538 | 2537 |
| 2539 | 2538 |
| 2540 } // namespace dart | 2539 } // namespace dart |
| OLD | NEW |