| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/profiler_service.h" | 5 #include "vm/profiler_service.h" |
| 6 | 6 |
| 7 #include "vm/growable_array.h" | 7 #include "vm/growable_array.h" |
| 8 #include "vm/native_symbol.h" | 8 #include "vm/native_symbol.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } else { | 193 } else { |
| 194 inclusive_ticks_++; | 194 inclusive_ticks_++; |
| 195 // Mark the last serial we ticked the inclusive count. | 195 // Mark the last serial we ticked the inclusive count. |
| 196 inclusive_tick_serial_ = serial; | 196 inclusive_tick_serial_ = serial; |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 | 199 |
| 200 void PrintToJSONObject(JSONObject* func) { | 200 void PrintToJSONObject(JSONObject* func) { |
| 201 func->AddProperty("type", "@Function"); | 201 func->AddProperty("type", "@Function"); |
| 202 func->AddProperty("name", name()); | 202 func->AddProperty("name", name()); |
| 203 func->AddProperty("kind", KindToCString(kind())); | 203 func->AddProperty("_kind", KindToCString(kind())); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void PrintToJSONArray(JSONArray* functions) { | 206 void PrintToJSONArray(JSONArray* functions) { |
| 207 JSONObject obj(functions); | 207 JSONObject obj(functions); |
| 208 obj.AddProperty("kind", KindToCString(kind())); | 208 obj.AddProperty("kind", KindToCString(kind())); |
| 209 obj.AddPropertyF("inclusiveTicks", "%" Pd "", inclusive_ticks()); | 209 obj.AddPropertyF("inclusiveTicks", "%" Pd "", inclusive_ticks()); |
| 210 obj.AddPropertyF("exclusiveTicks", "%" Pd "", exclusive_ticks()); | 210 obj.AddPropertyF("exclusiveTicks", "%" Pd "", exclusive_ticks()); |
| 211 if (kind() == kDartFunction) { | 211 if (kind() == kDartFunction) { |
| 212 ASSERT(!function_.IsNull()); | 212 ASSERT(!function_.IsNull()); |
| 213 obj.AddProperty("function", function_); | 213 obj.AddProperty("function", function_); |
| (...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 ASSERT(sample_buffer != NULL); | 2362 ASSERT(sample_buffer != NULL); |
| 2363 | 2363 |
| 2364 ClearProfileVisitor clear_profile(isolate); | 2364 ClearProfileVisitor clear_profile(isolate); |
| 2365 sample_buffer->VisitSamples(&clear_profile); | 2365 sample_buffer->VisitSamples(&clear_profile); |
| 2366 | 2366 |
| 2367 // Enable profile interrupts. | 2367 // Enable profile interrupts. |
| 2368 Profiler::BeginExecution(isolate); | 2368 Profiler::BeginExecution(isolate); |
| 2369 } | 2369 } |
| 2370 | 2370 |
| 2371 } // namespace dart | 2371 } // namespace dart |
| OLD | NEW |