| 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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 } | 1674 } |
| 1675 #endif // !PRODUCT | 1675 #endif // !PRODUCT |
| 1676 | 1676 |
| 1677 // Finalize any weak persistent handles with a non-null referent. | 1677 // Finalize any weak persistent handles with a non-null referent. |
| 1678 FinalizeWeakPersistentHandlesVisitor visitor; | 1678 FinalizeWeakPersistentHandlesVisitor visitor; |
| 1679 api_state()->weak_persistent_handles().VisitHandles(&visitor); | 1679 api_state()->weak_persistent_handles().VisitHandles(&visitor); |
| 1680 | 1680 |
| 1681 if (FLAG_dump_megamorphic_stats) { | 1681 if (FLAG_dump_megamorphic_stats) { |
| 1682 MegamorphicCacheTable::PrintSizes(this); | 1682 MegamorphicCacheTable::PrintSizes(this); |
| 1683 } | 1683 } |
| 1684 if (FLAG_dump_symbol_stats) { |
| 1685 Symbols::DumpStats(this); |
| 1686 } |
| 1684 if (FLAG_trace_isolates) { | 1687 if (FLAG_trace_isolates) { |
| 1685 heap()->PrintSizes(); | 1688 heap()->PrintSizes(); |
| 1686 Symbols::DumpStats(); | |
| 1687 OS::Print( | 1689 OS::Print( |
| 1688 "[-] Stopping isolate:\n" | 1690 "[-] Stopping isolate:\n" |
| 1689 "\tisolate: %s\n", | 1691 "\tisolate: %s\n", |
| 1690 name()); | 1692 name()); |
| 1691 } | 1693 } |
| 1692 if (FLAG_print_metrics) { | 1694 if (FLAG_print_metrics) { |
| 1693 LogBlock lb; | 1695 LogBlock lb; |
| 1694 OS::PrintErr("Printing metrics for %s\n", name()); | 1696 OS::PrintErr("Printing metrics for %s\n", name()); |
| 1695 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \ | 1697 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \ |
| 1696 OS::PrintErr("%s\n", metric_##variable##_.ToString()); | 1698 OS::PrintErr("%s\n", metric_##variable##_.ToString()); |
| (...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2974 void IsolateSpawnState::DecrementSpawnCount() { | 2976 void IsolateSpawnState::DecrementSpawnCount() { |
| 2975 ASSERT(spawn_count_monitor_ != NULL); | 2977 ASSERT(spawn_count_monitor_ != NULL); |
| 2976 ASSERT(spawn_count_ != NULL); | 2978 ASSERT(spawn_count_ != NULL); |
| 2977 MonitorLocker ml(spawn_count_monitor_); | 2979 MonitorLocker ml(spawn_count_monitor_); |
| 2978 ASSERT(*spawn_count_ > 0); | 2980 ASSERT(*spawn_count_ > 0); |
| 2979 *spawn_count_ = *spawn_count_ - 1; | 2981 *spawn_count_ = *spawn_count_ - 1; |
| 2980 ml.Notify(); | 2982 ml.Notify(); |
| 2981 } | 2983 } |
| 2982 | 2984 |
| 2983 } // namespace dart | 2985 } // namespace dart |
| OLD | NEW |