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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1175 if (event != NULL) { | 1175 if (event != NULL) { |
1176 event->Instant("Runnable"); | 1176 event->Instant("Runnable"); |
1177 event->Complete(); | 1177 event->Complete(); |
1178 } | 1178 } |
1179 } | 1179 } |
1180 if (FLAG_support_service && Service::isolate_stream.enabled()) { | 1180 if (FLAG_support_service && Service::isolate_stream.enabled()) { |
1181 ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable); | 1181 ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable); |
1182 Service::HandleEvent(&runnableEvent); | 1182 Service::HandleEvent(&runnableEvent); |
1183 } | 1183 } |
1184 #endif // !PRODUCT | 1184 #endif // !PRODUCT |
1185 if (FLAG_print_benchmarking_metrics) { | |
1186 // is_service_isolate not set yet. | |
1187 if (!ServiceIsolate::NameEquals(name())) { | |
1188 int64_t uptime = OS::GetCurrentTimeMicros() - start_time(); | |
sortie
2016/12/14 19:09:52
This interval seems to be measure in wall seconds
rmacnak
2016/12/16 19:10:22
Fixed this in another CL.
| |
1189 OS::Print("MakeRunnable(Latency): %" Pd64 " us.\n", uptime); | |
Cutch
2016/12/14 18:34:36
Please use the metric support in metrics.h instead
| |
1190 { | |
1191 StartIsolateScope scope(this); | |
1192 heap()->CollectAllGarbage(); | |
1193 } | |
1194 int64_t heap_size = (heap()->UsedInWords(Heap::kNew) * kWordSize) + | |
1195 (heap()->UsedInWords(Heap::kOld) * kWordSize); | |
1196 OS::Print("MakeRunnable(HeapSize): %" Pd64 " B.\n", heap_size); | |
1197 } | |
1198 } | |
1185 return true; | 1199 return true; |
1186 } | 1200 } |
1187 | 1201 |
1188 | 1202 |
1189 bool Isolate::VerifyPauseCapability(const Object& capability) const { | 1203 bool Isolate::VerifyPauseCapability(const Object& capability) const { |
1190 return !capability.IsNull() && capability.IsCapability() && | 1204 return !capability.IsNull() && capability.IsCapability() && |
1191 (pause_capability() == Capability::Cast(capability).Id()); | 1205 (pause_capability() == Capability::Cast(capability).Id()); |
1192 } | 1206 } |
1193 | 1207 |
1194 | 1208 |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2942 void IsolateSpawnState::DecrementSpawnCount() { | 2956 void IsolateSpawnState::DecrementSpawnCount() { |
2943 ASSERT(spawn_count_monitor_ != NULL); | 2957 ASSERT(spawn_count_monitor_ != NULL); |
2944 ASSERT(spawn_count_ != NULL); | 2958 ASSERT(spawn_count_ != NULL); |
2945 MonitorLocker ml(spawn_count_monitor_); | 2959 MonitorLocker ml(spawn_count_monitor_); |
2946 ASSERT(*spawn_count_ > 0); | 2960 ASSERT(*spawn_count_ > 0); |
2947 *spawn_count_ = *spawn_count_ - 1; | 2961 *spawn_count_ = *spawn_count_ - 1; |
2948 ml.Notify(); | 2962 ml.Notify(); |
2949 } | 2963 } |
2950 | 2964 |
2951 } // namespace dart | 2965 } // namespace dart |
OLD | NEW |