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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/service/object.dart

Issue 331323002: Show pid on Observatory VM page (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/client/lib/src/elements/vm_view.html ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 part of service; 5 part of service;
6 6
7 /// A [ServiceObject] is an object known to the VM service and is tied 7 /// A [ServiceObject] is an object known to the VM service and is tied
8 /// to an owning [Isolate]. 8 /// to an owning [Isolate].
9 abstract class ServiceObject extends Observable { 9 abstract class ServiceObject extends Observable {
10 /// The owner of this [ServiceObject]. This can be an [Isolate], a 10 /// The owner of this [ServiceObject]. This can be an [Isolate], a
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 @reflectable Iterable<Isolate> get isolates => _isolateCache.values; 183 @reflectable Iterable<Isolate> get isolates => _isolateCache.values;
184 184
185 @reflectable String get link => '$id'; 185 @reflectable String get link => '$id';
186 @reflectable String relativeLink(String id) => '$id'; 186 @reflectable String relativeLink(String id) => '$id';
187 187
188 @observable String version = 'unknown'; 188 @observable String version = 'unknown';
189 @observable String architecture = 'unknown'; 189 @observable String architecture = 'unknown';
190 @observable double uptime = 0.0; 190 @observable double uptime = 0.0;
191 @observable bool assertsEnabled = false; 191 @observable bool assertsEnabled = false;
192 @observable bool typeChecksEnabled = false; 192 @observable bool typeChecksEnabled = false;
193 @observable String pid = '';
193 194
194 VM() : super._empty(null) { 195 VM() : super._empty(null) {
195 name = 'vm'; 196 name = 'vm';
196 vmName = 'vm'; 197 vmName = 'vm';
197 _cache['vm'] = this; 198 _cache['vm'] = this;
198 update(toObservable({'id':'vm', 'type':'@VM'})); 199 update(toObservable({'id':'vm', 'type':'@VM'}));
199 } 200 }
200 201
201 final StreamController<ServiceException> exceptions = 202 final StreamController<ServiceException> exceptions =
202 new StreamController.broadcast(); 203 new StreamController.broadcast();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 368
368 void _update(ObservableMap map, bool mapIsRef) { 369 void _update(ObservableMap map, bool mapIsRef) {
369 if (mapIsRef) { 370 if (mapIsRef) {
370 return; 371 return;
371 } 372 }
372 _loaded = true; 373 _loaded = true;
373 version = map['version']; 374 version = map['version'];
374 architecture = map['architecture']; 375 architecture = map['architecture'];
375 uptime = map['uptime']; 376 uptime = map['uptime'];
376 assertsEnabled = map['assertsEnabled']; 377 assertsEnabled = map['assertsEnabled'];
378 pid = map['pid'];
377 typeChecksEnabled = map['typeChecksEnabled']; 379 typeChecksEnabled = map['typeChecksEnabled'];
378 _updateIsolates(map['isolates']); 380 _updateIsolates(map['isolates']);
379 } 381 }
380 382
381 void _updateIsolates(List newIsolates) { 383 void _updateIsolates(List newIsolates) {
382 var oldIsolateCache = _isolateCache; 384 var oldIsolateCache = _isolateCache;
383 var newIsolateCache = new Map<String,Isolate>(); 385 var newIsolateCache = new Map<String,Isolate>();
384 for (var isolateMap in newIsolates) { 386 for (var isolateMap in newIsolates) {
385 var isolateId = isolateMap['id']; 387 var isolateId = isolateMap['id'];
386 var isolate = oldIsolateCache[isolateId]; 388 var isolate = oldIsolateCache[isolateId];
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 var v = list[i]; 1740 var v = list[i];
1739 if ((v is ObservableMap) && _isServiceMap(v)) { 1741 if ((v is ObservableMap) && _isServiceMap(v)) {
1740 list[i] = owner.getFromMap(v); 1742 list[i] = owner.getFromMap(v);
1741 } else if (v is ObservableList) { 1743 } else if (v is ObservableList) {
1742 _upgradeObservableList(v, owner); 1744 _upgradeObservableList(v, owner);
1743 } else if (v is ObservableMap) { 1745 } else if (v is ObservableMap) {
1744 _upgradeObservableMap(v, owner); 1746 _upgradeObservableMap(v, owner);
1745 } 1747 }
1746 } 1748 }
1747 } 1749 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/vm_view.html ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698