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

Side by Side Diff: runtime/vm/service/vmservice.dart

Issue 434763002: Add VMService GC events (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/service/constants.dart ('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 library vmservice; 5 library vmservice;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 void _removeClient(Client client) { 37 void _removeClient(Client client) {
38 clients.remove(client); 38 clients.remove(client);
39 } 39 }
40 40
41 int eventTypeCode(String eventType) { 41 int eventTypeCode(String eventType) {
42 switch(eventType) { 42 switch(eventType) {
43 case 'debug': 43 case 'debug':
44 return Constants.EVENT_FAMILY_DEBUG; 44 return Constants.EVENT_FAMILY_DEBUG;
45 case 'gc':
46 return Constants.EVENT_FAMILY_GC;
45 default: 47 default:
46 return -1; 48 return -1;
47 } 49 }
48 } 50 }
49 51
50 void _updateEventMask() { 52 void _updateEventMask() {
51 int mask = 0; 53 int mask = 0;
52 for (var key in eventMap.keys) { 54 for (var key in eventMap.keys) {
53 var subscribers = eventMap[key]; 55 var subscribers = eventMap[key];
54 if (subscribers.isNotEmpty) { 56 if (subscribers.isNotEmpty) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return new VMService().eventPort; 147 return new VMService().eventPort;
146 } 148 }
147 149
148 void _registerIsolate(int port_id, SendPort sp, String name) { 150 void _registerIsolate(int port_id, SendPort sp, String name) {
149 var service = new VMService(); 151 var service = new VMService();
150 service.runningIsolates.isolateStartup(port_id, sp, name); 152 service.runningIsolates.isolateStartup(port_id, sp, name);
151 } 153 }
152 154
153 void _setEventMask(int mask) 155 void _setEventMask(int mask)
154 native "VMService_SetEventMask"; 156 native "VMService_SetEventMask";
OLDNEW
« no previous file with comments | « runtime/vm/service/constants.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698