| 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/service.h" | 5 #include "vm/service.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/globals.h" | 9 #include "platform/globals.h" |
| 10 | 10 |
| (...skipping 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2339 Profile::kUser, | 2339 Profile::kUser, |
| 2340 Profile::kVMUser, | 2340 Profile::kVMUser, |
| 2341 Profile::kVM, | 2341 Profile::kVM, |
| 2342 Profile::kNoTags, // Default value. | 2342 Profile::kNoTags, // Default value. |
| 2343 }; | 2343 }; |
| 2344 | 2344 |
| 2345 | 2345 |
| 2346 static const MethodParameter* get_cpu_profile_params[] = { | 2346 static const MethodParameter* get_cpu_profile_params[] = { |
| 2347 ISOLATE_PARAMETER, | 2347 ISOLATE_PARAMETER, |
| 2348 new EnumParameter("tags", true, tags_enum_names), | 2348 new EnumParameter("tags", true, tags_enum_names), |
| 2349 new BoolParameter("_codeTransitionTags", false), |
| 2349 NULL, | 2350 NULL, |
| 2350 }; | 2351 }; |
| 2351 | 2352 |
| 2352 | 2353 |
| 2353 // TODO(johnmccutchan): Rename this to GetCpuSamples. | 2354 // TODO(johnmccutchan): Rename this to GetCpuSamples. |
| 2354 static bool GetCpuProfile(Isolate* isolate, JSONStream* js) { | 2355 static bool GetCpuProfile(Isolate* isolate, JSONStream* js) { |
| 2355 Profile::TagOrder tag_order = | 2356 Profile::TagOrder tag_order = |
| 2356 EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values); | 2357 EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values); |
| 2357 ProfilerService::PrintJSON(js, tag_order); | 2358 intptr_t extra_tags = 0; |
| 2359 if (BoolParameter::Parse(js->LookupParam("_codeTransitionTags"))) { |
| 2360 extra_tags |= ProfilerService::kCodeTransitionTagsBit; |
| 2361 } |
| 2362 ProfilerService::PrintJSON(js, tag_order, extra_tags); |
| 2358 return true; | 2363 return true; |
| 2359 } | 2364 } |
| 2360 | 2365 |
| 2361 | 2366 |
| 2362 static const MethodParameter* get_allocation_samples_params[] = { | 2367 static const MethodParameter* get_allocation_samples_params[] = { |
| 2363 ISOLATE_PARAMETER, | 2368 ISOLATE_PARAMETER, |
| 2364 new EnumParameter("tags", true, tags_enum_names), | 2369 new EnumParameter("tags", true, tags_enum_names), |
| 2365 new IdParameter("classId", false), | 2370 new IdParameter("classId", false), |
| 2366 NULL, | 2371 NULL, |
| 2367 }; | 2372 }; |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3079 ServiceMethodDescriptor& method = service_methods_[i]; | 3084 ServiceMethodDescriptor& method = service_methods_[i]; |
| 3080 if (strcmp(method_name, method.name) == 0) { | 3085 if (strcmp(method_name, method.name) == 0) { |
| 3081 return &method; | 3086 return &method; |
| 3082 } | 3087 } |
| 3083 } | 3088 } |
| 3084 return NULL; | 3089 return NULL; |
| 3085 } | 3090 } |
| 3086 | 3091 |
| 3087 | 3092 |
| 3088 } // namespace dart | 3093 } // namespace dart |
| OLD | NEW |