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

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

Issue 2690323003: Hide kernel isolate from isolate list; do not register it either (Closed)
Patch Set: Show kernel isolate if passing flag Created 3 years, 10 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/kernel_isolate.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 "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 22 matching lines...) Expand all
33 #include "vm/safepoint.h" 33 #include "vm/safepoint.h"
34 #include "vm/service_event.h" 34 #include "vm/service_event.h"
35 #include "vm/service_isolate.h" 35 #include "vm/service_isolate.h"
36 #include "vm/source_report.h" 36 #include "vm/source_report.h"
37 #include "vm/stack_frame.h" 37 #include "vm/stack_frame.h"
38 #include "vm/symbols.h" 38 #include "vm/symbols.h"
39 #include "vm/timeline.h" 39 #include "vm/timeline.h"
40 #include "vm/type_table.h" 40 #include "vm/type_table.h"
41 #include "vm/unicode.h" 41 #include "vm/unicode.h"
42 #include "vm/version.h" 42 #include "vm/version.h"
43 #include "vm/kernel_isolate.h"
43 44
44 namespace dart { 45 namespace dart {
45 46
46 #define Z (T->zone()) 47 #define Z (T->zone())
47 48
48 49
49 DECLARE_FLAG(bool, trace_service); 50 DECLARE_FLAG(bool, trace_service);
50 DECLARE_FLAG(bool, trace_service_pause_events); 51 DECLARE_FLAG(bool, trace_service_pause_events);
51 DECLARE_FLAG(bool, profile_vm); 52 DECLARE_FLAG(bool, profile_vm);
52 DEFINE_FLAG(charp, 53 DEFINE_FLAG(charp,
53 vm_name, 54 vm_name,
54 "vm", 55 "vm",
55 "The default name of this vm as reported by the VM service " 56 "The default name of this vm as reported by the VM service "
56 "protocol"); 57 "protocol");
57 58
58 DEFINE_FLAG(bool, 59 DEFINE_FLAG(bool,
59 warn_on_pause_with_no_debugger, 60 warn_on_pause_with_no_debugger,
60 false, 61 false,
61 "Print a message when an isolate is paused but there is no " 62 "Print a message when an isolate is paused but there is no "
62 "debugger attached."); 63 "debugger attached.");
63 64
65 DECLARE_FLAG(bool, show_kernel_isolate);
66
64 #ifndef PRODUCT 67 #ifndef PRODUCT
65 // The name of this of this vm as reported by the VM service protocol. 68 // The name of this of this vm as reported by the VM service protocol.
66 static char* vm_name = NULL; 69 static char* vm_name = NULL;
67 70
68 71
69 static const char* GetVMName() { 72 static const char* GetVMName() {
70 if (vm_name == NULL) { 73 if (vm_name == NULL) {
71 return FLAG_vm_name; 74 return FLAG_vm_name;
72 } 75 }
73 return vm_name; 76 return vm_name;
(...skipping 3701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3775 return true; 3778 return true;
3776 } 3779 }
3777 3780
3778 3781
3779 class ServiceIsolateVisitor : public IsolateVisitor { 3782 class ServiceIsolateVisitor : public IsolateVisitor {
3780 public: 3783 public:
3781 explicit ServiceIsolateVisitor(JSONArray* jsarr) : jsarr_(jsarr) {} 3784 explicit ServiceIsolateVisitor(JSONArray* jsarr) : jsarr_(jsarr) {}
3782 virtual ~ServiceIsolateVisitor() {} 3785 virtual ~ServiceIsolateVisitor() {}
3783 3786
3784 void VisitIsolate(Isolate* isolate) { 3787 void VisitIsolate(Isolate* isolate) {
3785 if (!IsVMInternalIsolate(isolate)) { 3788 bool is_kernel_isolate = false;
3789 #ifndef DART_PRECOMPILED_RUNTIME
3790 is_kernel_isolate =
3791 KernelIsolate::IsKernelIsolate(isolate) && !FLAG_show_kernel_isolate;
3792 #endif
3793 if (!IsVMInternalIsolate(isolate) && !is_kernel_isolate) {
3786 jsarr_->AddValue(isolate); 3794 jsarr_->AddValue(isolate);
3787 } 3795 }
3788 } 3796 }
3789 3797
3790 private: 3798 private:
3791 JSONArray* jsarr_; 3799 JSONArray* jsarr_;
3792 }; 3800 };
3793 3801
3794 3802
3795 static const MethodParameter* get_vm_params[] = { 3803 static const MethodParameter* get_vm_params[] = {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
4144 if (strcmp(method_name, method.name) == 0) { 4152 if (strcmp(method_name, method.name) == 0) {
4145 return &method; 4153 return &method;
4146 } 4154 }
4147 } 4155 }
4148 return NULL; 4156 return NULL;
4149 } 4157 }
4150 4158
4151 #endif // !PRODUCT 4159 #endif // !PRODUCT
4152 4160
4153 } // namespace dart 4161 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/kernel_isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698