Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: runtime/vm/service.cc

Issue 1210333002: Make CPU profile models public and refactor model building code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 static const char* tags_enum_names[] = { 2217 static const char* tags_enum_names[] = {
2218 "None", 2218 "None",
2219 "UserVM", 2219 "UserVM",
2220 "UserOnly", 2220 "UserOnly",
2221 "VMUser", 2221 "VMUser",
2222 "VMOnly", 2222 "VMOnly",
2223 NULL, 2223 NULL,
2224 }; 2224 };
2225 2225
2226 2226
2227 static ProfilerService::TagOrder tags_enum_values[] = { 2227 static Profile::TagOrder tags_enum_values[] = {
2228 ProfilerService::kNoTags, 2228 Profile::kNoTags,
2229 ProfilerService::kUserVM, 2229 Profile::kUserVM,
2230 ProfilerService::kUser, 2230 Profile::kUser,
2231 ProfilerService::kVMUser, 2231 Profile::kVMUser,
2232 ProfilerService::kVM, 2232 Profile::kVM,
2233 ProfilerService::kNoTags, // Default value. 2233 Profile::kNoTags, // Default value.
2234 }; 2234 };
2235 2235
2236 2236
2237 static const MethodParameter* get_cpu_profile_params[] = { 2237 static const MethodParameter* get_cpu_profile_params[] = {
2238 ISOLATE_PARAMETER, 2238 ISOLATE_PARAMETER,
2239 new EnumParameter("tags", true, tags_enum_names), 2239 new EnumParameter("tags", true, tags_enum_names),
2240 NULL, 2240 NULL,
2241 }; 2241 };
2242 2242
2243 2243
2244 static bool GetCpuProfile(Isolate* isolate, JSONStream* js) { 2244 static bool GetCpuProfile(Isolate* isolate, JSONStream* js) {
2245 ProfilerService::TagOrder tag_order = 2245 Profile::TagOrder tag_order =
2246 EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values); 2246 EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values);
2247 ProfilerService::PrintJSON(js, tag_order); 2247 ProfilerService::PrintJSON(js, tag_order);
2248 return true; 2248 return true;
2249 } 2249 }
2250 2250
2251 2251
2252 static const MethodParameter* clear_cpu_profile_params[] = { 2252 static const MethodParameter* clear_cpu_profile_params[] = {
2253 ISOLATE_PARAMETER, 2253 ISOLATE_PARAMETER,
2254 NULL, 2254 NULL,
2255 }; 2255 };
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 ServiceMethodDescriptor& method = service_methods_[i]; 2852 ServiceMethodDescriptor& method = service_methods_[i];
2853 if (strcmp(method_name, method.name) == 0) { 2853 if (strcmp(method_name, method.name) == 0) {
2854 return &method; 2854 return &method;
2855 } 2855 }
2856 } 2856 }
2857 return NULL; 2857 return NULL;
2858 } 2858 }
2859 2859
2860 2860
2861 } // namespace dart 2861 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698