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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 DECLARE_FLAG(bool, trace_service); | 44 DECLARE_FLAG(bool, trace_service); |
45 DECLARE_FLAG(bool, trace_service_pause_events); | 45 DECLARE_FLAG(bool, trace_service_pause_events); |
46 DEFINE_FLAG(charp, vm_name, "vm", | 46 DEFINE_FLAG(charp, vm_name, "vm", |
47 "The default name of this vm as reported by the VM service " | 47 "The default name of this vm as reported by the VM service " |
48 "protocol"); | 48 "protocol"); |
49 | 49 |
50 DEFINE_FLAG(bool, warn_on_pause_with_no_debugger, false, | 50 DEFINE_FLAG(bool, warn_on_pause_with_no_debugger, false, |
51 "Print a message when an isolate is paused but there is no " | 51 "Print a message when an isolate is paused but there is no " |
52 "debugger attached."); | 52 "debugger attached."); |
53 | 53 |
| 54 #ifndef PRODUCT |
54 // The name of this of this vm as reported by the VM service protocol. | 55 // The name of this of this vm as reported by the VM service protocol. |
55 static char* vm_name = NULL; | 56 static char* vm_name = NULL; |
56 | 57 |
57 | 58 |
58 static const char* GetVMName() { | 59 static const char* GetVMName() { |
59 if (vm_name == NULL) { | 60 if (vm_name == NULL) { |
60 return FLAG_vm_name; | 61 return FLAG_vm_name; |
61 } | 62 } |
62 return vm_name; | 63 return vm_name; |
63 } | 64 } |
(...skipping 3887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3951 sizeof(service_methods_[0]); | 3952 sizeof(service_methods_[0]); |
3952 for (intptr_t i = 0; i < num_methods; i++) { | 3953 for (intptr_t i = 0; i < num_methods; i++) { |
3953 const ServiceMethodDescriptor& method = service_methods_[i]; | 3954 const ServiceMethodDescriptor& method = service_methods_[i]; |
3954 if (strcmp(method_name, method.name) == 0) { | 3955 if (strcmp(method_name, method.name) == 0) { |
3955 return &method; | 3956 return &method; |
3956 } | 3957 } |
3957 } | 3958 } |
3958 return NULL; | 3959 return NULL; |
3959 } | 3960 } |
3960 | 3961 |
| 3962 #endif // !PRODUCT |
3961 | 3963 |
3962 } // namespace dart | 3964 } // namespace dart |
OLD | NEW |