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

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

Issue 533073005: Reduce service isolate startup time from ~80ms to ~30ms (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/vm/service.cc » ('j') | 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 #ifndef VM_SERVICE_H_ 5 #ifndef VM_SERVICE_H_
6 #define VM_SERVICE_H_ 6 #define VM_SERVICE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 20 matching lines...) Expand all
31 static void HandleIsolateMessage(Isolate* isolate, const Array& message); 31 static void HandleIsolateMessage(Isolate* isolate, const Array& message);
32 32
33 static Isolate* GetServiceIsolate(void* callback_data); 33 static Isolate* GetServiceIsolate(void* callback_data);
34 static bool SendIsolateStartupMessage(); 34 static bool SendIsolateStartupMessage();
35 static bool SendIsolateShutdownMessage(); 35 static bool SendIsolateShutdownMessage();
36 36
37 static bool IsRunning() { 37 static bool IsRunning() {
38 return port_ != ILLEGAL_PORT; 38 return port_ != ILLEGAL_PORT;
39 } 39 }
40 40
41 static void set_port(Dart_Port port) {
42 port_ = port;
43 }
44
41 static void SetEventMask(uint32_t mask); 45 static void SetEventMask(uint32_t mask);
42 46
43 // Is the service interested in debugger events? 47 // Is the service interested in debugger events?
44 static bool NeedsDebuggerEvents() { 48 static bool NeedsDebuggerEvents() {
45 return IsRunning() && ((event_mask_ & kEventFamilyDebugMask) != 0); 49 return IsRunning() && ((event_mask_ & kEventFamilyDebugMask) != 0);
46 } 50 }
47 // Is the service interested in garbage collection events? 51 // Is the service interested in garbage collection events?
48 static bool NeedsGCEvents() { 52 static bool NeedsGCEvents() {
49 return IsRunning() && ((event_mask_ & kEventFamilyGCMask) != 0); 53 return IsRunning() && ((event_mask_ & kEventFamilyGCMask) != 0);
50 } 54 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 98
95 static Isolate* service_isolate_; 99 static Isolate* service_isolate_;
96 static Dart_LibraryTagHandler embedder_provided_handler_; 100 static Dart_LibraryTagHandler embedder_provided_handler_;
97 static Dart_Port port_; 101 static Dart_Port port_;
98 static uint32_t event_mask_; 102 static uint32_t event_mask_;
99 }; 103 };
100 104
101 } // namespace dart 105 } // namespace dart
102 106
103 #endif // VM_SERVICE_H_ 107 #endif // VM_SERVICE_H_
OLDNEW
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698