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/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "vm/timeline_analysis.h" | 46 #include "vm/timeline_analysis.h" |
47 #include "vm/timer.h" | 47 #include "vm/timer.h" |
48 #include "vm/visitor.h" | 48 #include "vm/visitor.h" |
49 | 49 |
50 | 50 |
51 namespace dart { | 51 namespace dart { |
52 | 52 |
53 DECLARE_FLAG(bool, print_metrics); | 53 DECLARE_FLAG(bool, print_metrics); |
54 DECLARE_FLAG(bool, timing); | 54 DECLARE_FLAG(bool, timing); |
55 DECLARE_FLAG(bool, trace_service); | 55 DECLARE_FLAG(bool, trace_service); |
56 | |
57 DEFINE_FLAG(bool, trace_isolates, false, | |
58 "Trace isolate creation and shut down."); | |
59 DEFINE_FLAG(bool, pause_isolates_on_start, false, | |
60 "Pause isolates before starting."); | |
61 DEFINE_FLAG(bool, pause_isolates_on_exit, false, | |
62 "Pause isolates exiting."); | |
63 DEFINE_FLAG(bool, pause_isolates_on_unhandled_exceptions, false, | |
64 "Pause isolates on unhandled exceptions."); | |
65 | |
66 DEFINE_FLAG(bool, break_at_isolate_spawn, false, | |
67 "Insert a one-time breakpoint at the entrypoint for all spawned " | |
68 "isolates"); | |
69 | |
70 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32, | |
71 "Max size of new gen semi space in MB"); | |
72 DEFINE_FLAG(int, old_gen_heap_size, 0, | |
73 "Max size of old gen heap size in MB, or 0 for unlimited," | |
74 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap"); | |
75 DEFINE_FLAG(int, external_max_size, (kWordSize <= 4) ? 512 : 1024, | |
76 "Max total size of external allocations in MB, or 0 for unlimited," | |
77 "e.g: --external_max_size=1024 allows up to 1024MB of externals"); | |
78 | |
79 DECLARE_FLAG(bool, warn_on_pause_with_no_debugger); | 56 DECLARE_FLAG(bool, warn_on_pause_with_no_debugger); |
80 | 57 |
81 NOT_IN_PRODUCT( | 58 NOT_IN_PRODUCT( |
82 static void CheckedModeHandler(bool value) { | 59 static void CheckedModeHandler(bool value) { |
83 FLAG_enable_asserts = value; | 60 FLAG_enable_asserts = value; |
84 FLAG_enable_type_checks = value; | 61 FLAG_enable_type_checks = value; |
85 } | 62 } |
86 | 63 |
87 // --enable-checked-mode and --checked both enable checked mode which is | 64 // --enable-checked-mode and --checked both enable checked mode which is |
88 // equivalent to setting --enable-asserts and --enable-type-checks. | 65 // equivalent to setting --enable-asserts and --enable-type-checks. |
(...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 void IsolateSpawnState::DecrementSpawnCount() { | 2666 void IsolateSpawnState::DecrementSpawnCount() { |
2690 ASSERT(spawn_count_monitor_ != NULL); | 2667 ASSERT(spawn_count_monitor_ != NULL); |
2691 ASSERT(spawn_count_ != NULL); | 2668 ASSERT(spawn_count_ != NULL); |
2692 MonitorLocker ml(spawn_count_monitor_); | 2669 MonitorLocker ml(spawn_count_monitor_); |
2693 ASSERT(*spawn_count_ > 0); | 2670 ASSERT(*spawn_count_ > 0); |
2694 *spawn_count_ = *spawn_count_ - 1; | 2671 *spawn_count_ = *spawn_count_ - 1; |
2695 ml.Notify(); | 2672 ml.Notify(); |
2696 } | 2673 } |
2697 | 2674 |
2698 } // namespace dart | 2675 } // namespace dart |
OLD | NEW |