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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 | 2396 |
2397 static bool GetCoverage(Thread* thread, JSONStream* js) { | 2397 static bool GetCoverage(Thread* thread, JSONStream* js) { |
2398 // TODO(rmacnak): Remove this response; it is subsumed by GetCallSiteData. | 2398 // TODO(rmacnak): Remove this response; it is subsumed by GetCallSiteData. |
2399 return GetHitsOrSites(thread, js, false); | 2399 return GetHitsOrSites(thread, js, false); |
2400 } | 2400 } |
2401 | 2401 |
2402 | 2402 |
2403 static const char* kCallSitesStr = "_CallSites"; | 2403 static const char* kCallSitesStr = "_CallSites"; |
2404 static const char* kCoverageStr = "Coverage"; | 2404 static const char* kCoverageStr = "Coverage"; |
2405 static const char* kPossibleBreakpointsStr = "PossibleBreakpoints"; | 2405 static const char* kPossibleBreakpointsStr = "PossibleBreakpoints"; |
2406 | 2406 static const char* kProfile = "Profile"; |
2407 | 2407 |
2408 static const char* const report_enum_names[] = { | 2408 static const char* const report_enum_names[] = { |
2409 kCallSitesStr, | 2409 kCallSitesStr, |
2410 kCoverageStr, | 2410 kCoverageStr, |
2411 kPossibleBreakpointsStr, | 2411 kPossibleBreakpointsStr, |
2412 NULL, | 2412 NULL, |
2413 }; | 2413 }; |
2414 | 2414 |
2415 | 2415 |
2416 static const MethodParameter* get_source_report_params[] = { | 2416 static const MethodParameter* get_source_report_params[] = { |
(...skipping 18 matching lines...) Expand all Loading... |
2435 static_cast<const EnumListParameter*>(get_source_report_params[1]); | 2435 static_cast<const EnumListParameter*>(get_source_report_params[1]); |
2436 const char** reports = reports_parameter->Parse(thread->zone(), reports_str); | 2436 const char** reports = reports_parameter->Parse(thread->zone(), reports_str); |
2437 intptr_t report_set = 0; | 2437 intptr_t report_set = 0; |
2438 while (*reports != NULL) { | 2438 while (*reports != NULL) { |
2439 if (strcmp(*reports, kCallSitesStr) == 0) { | 2439 if (strcmp(*reports, kCallSitesStr) == 0) { |
2440 report_set |= SourceReport::kCallSites; | 2440 report_set |= SourceReport::kCallSites; |
2441 } else if (strcmp(*reports, kCoverageStr) == 0) { | 2441 } else if (strcmp(*reports, kCoverageStr) == 0) { |
2442 report_set |= SourceReport::kCoverage; | 2442 report_set |= SourceReport::kCoverage; |
2443 } else if (strcmp(*reports, kPossibleBreakpointsStr) == 0) { | 2443 } else if (strcmp(*reports, kPossibleBreakpointsStr) == 0) { |
2444 report_set |= SourceReport::kPossibleBreakpoints; | 2444 report_set |= SourceReport::kPossibleBreakpoints; |
| 2445 } else if (strcmp(*reports, kProfile) == 0) { |
| 2446 report_set |= SourceReport::kProfile; |
2445 } | 2447 } |
2446 reports++; | 2448 reports++; |
2447 } | 2449 } |
2448 | 2450 |
2449 SourceReport::CompileMode compile_mode = SourceReport::kNoCompile; | 2451 SourceReport::CompileMode compile_mode = SourceReport::kNoCompile; |
2450 if (BoolParameter::Parse(js->LookupParam("forceCompile"), false)) { | 2452 if (BoolParameter::Parse(js->LookupParam("forceCompile"), false)) { |
2451 compile_mode = SourceReport::kForceCompile; | 2453 compile_mode = SourceReport::kForceCompile; |
2452 } | 2454 } |
2453 | 2455 |
2454 Script& script = Script::Handle(); | 2456 Script& script = Script::Handle(); |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4108 if (strcmp(method_name, method.name) == 0) { | 4110 if (strcmp(method_name, method.name) == 0) { |
4109 return &method; | 4111 return &method; |
4110 } | 4112 } |
4111 } | 4113 } |
4112 return NULL; | 4114 return NULL; |
4113 } | 4115 } |
4114 | 4116 |
4115 #endif // !PRODUCT | 4117 #endif // !PRODUCT |
4116 | 4118 |
4117 } // namespace dart | 4119 } // namespace dart |
OLD | NEW |