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

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

Issue 2996803002: Add current rss and embedder name to Observatory (Closed)
Patch Set: Refactoring Created 3 years, 4 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
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 #ifndef RUNTIME_VM_SERVICE_H_ 5 #ifndef RUNTIME_VM_SERVICE_H_
6 #define RUNTIME_VM_SERVICE_H_ 6 #define RUNTIME_VM_SERVICE_H_
7 7
8 #include "include/dart_tools_api.h" 8 #include "include/dart_tools_api.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 static void RegisterIsolateEmbedderCallback( 94 static void RegisterIsolateEmbedderCallback(
95 const char* name, 95 const char* name,
96 Dart_ServiceRequestCallback callback, 96 Dart_ServiceRequestCallback callback,
97 void* user_data); 97 void* user_data);
98 98
99 static void RegisterRootEmbedderCallback(const char* name, 99 static void RegisterRootEmbedderCallback(const char* name,
100 Dart_ServiceRequestCallback callback, 100 Dart_ServiceRequestCallback callback,
101 void* user_data); 101 void* user_data);
102 102
103 static void SetEmbedderInformationCallback(
104 Dart_EmbedderInformationCallback callback);
105
103 static void SetEmbedderStreamCallbacks( 106 static void SetEmbedderStreamCallbacks(
104 Dart_ServiceStreamListenCallback listen_callback, 107 Dart_ServiceStreamListenCallback listen_callback,
105 Dart_ServiceStreamCancelCallback cancel_callback); 108 Dart_ServiceStreamCancelCallback cancel_callback);
106 109
107 static void SetGetServiceAssetsCallback( 110 static void SetGetServiceAssetsCallback(
108 Dart_GetVMServiceAssetsArchive get_service_assets); 111 Dart_GetVMServiceAssetsArchive get_service_assets);
109 112
110 static void SendEchoEvent(Isolate* isolate, const char* text); 113 static void SendEchoEvent(Isolate* isolate, const char* text);
111 static void SendGraphEvent(Thread* thread, 114 static void SendGraphEvent(Thread* thread,
112 ObjectGraph::SnapshotRoots roots, 115 ObjectGraph::SnapshotRoots roots,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return stream_listen_callback_; 163 return stream_listen_callback_;
161 } 164 }
162 static Dart_ServiceStreamCancelCallback stream_cancel_callback() { 165 static Dart_ServiceStreamCancelCallback stream_cancel_callback() {
163 return stream_cancel_callback_; 166 return stream_cancel_callback_;
164 } 167 }
165 168
166 static void PrintJSONForVM(JSONStream* js, bool ref); 169 static void PrintJSONForVM(JSONStream* js, bool ref);
167 170
168 static void CheckForPause(Isolate* isolate, JSONStream* stream); 171 static void CheckForPause(Isolate* isolate, JSONStream* stream);
169 172
173 static int64_t CurrentRSS();
174 static int64_t MaxRSS();
175
170 private: 176 private:
171 static RawError* InvokeMethod(Isolate* isolate, 177 static RawError* InvokeMethod(Isolate* isolate,
172 const Array& message, 178 const Array& message,
173 bool parameters_are_dart_objects = false); 179 bool parameters_are_dart_objects = false);
174 180
175 static void EmbedderHandleMessage(EmbedderServiceHandler* handler, 181 static void EmbedderHandleMessage(EmbedderServiceHandler* handler,
176 JSONStream* js); 182 JSONStream* js);
177 183
178 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name); 184 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name);
179 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name); 185 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name);
(...skipping 22 matching lines...) Expand all
202 const char* kind, 208 const char* kind,
203 JSONStream* event); 209 JSONStream* event);
204 210
205 static RawError* MaybePause(Isolate* isolate, const Error& error); 211 static RawError* MaybePause(Isolate* isolate, const Error& error);
206 212
207 static EmbedderServiceHandler* isolate_service_handler_head_; 213 static EmbedderServiceHandler* isolate_service_handler_head_;
208 static EmbedderServiceHandler* root_service_handler_head_; 214 static EmbedderServiceHandler* root_service_handler_head_;
209 static Dart_ServiceStreamListenCallback stream_listen_callback_; 215 static Dart_ServiceStreamListenCallback stream_listen_callback_;
210 static Dart_ServiceStreamCancelCallback stream_cancel_callback_; 216 static Dart_ServiceStreamCancelCallback stream_cancel_callback_;
211 static Dart_GetVMServiceAssetsArchive get_service_assets_callback_; 217 static Dart_GetVMServiceAssetsArchive get_service_assets_callback_;
218 static Dart_EmbedderInformationCallback embedder_information_callback_;
212 219
213 static bool needs_isolate_events_; 220 static bool needs_isolate_events_;
214 static bool needs_debug_events_; 221 static bool needs_debug_events_;
215 static bool needs_gc_events_; 222 static bool needs_gc_events_;
216 static bool needs_echo_events_; 223 static bool needs_echo_events_;
217 static bool needs_graph_events_; 224 static bool needs_graph_events_;
218 }; 225 };
219 226
220 } // namespace dart 227 } // namespace dart
221 228
222 #endif // RUNTIME_VM_SERVICE_H_ 229 #endif // RUNTIME_VM_SERVICE_H_
OLDNEW
« no previous file with comments | « runtime/vm/os_win.cc ('k') | runtime/vm/service.cc » ('j') | runtime/vm/service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698