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

Side by Side Diff: runtime/observatory/lib/src/elements/isolate_view.dart

Issue 2762323002: Reimplemented zone memory tracking to avoid race conditions that were causing crashes in the previo… (Closed)
Patch Set: Final change Created 3 years, 9 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 | « no previous file | runtime/observatory/lib/src/models/objects/isolate.dart » ('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 library isolate_view_element; 5 library isolate_view_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/curly_block.dart'; 10 import 'package:observatory/src/elements/curly_block.dart';
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 ..children = [ 295 ..children = [
296 new AnchorElement(href: Uris.objectStore(_isolate)) 296 new AnchorElement(href: Uris.objectStore(_isolate))
297 ..text = 'object store' 297 ..text = 'object store'
298 ] 298 ]
299 ], 299 ],
300 new DivElement() 300 new DivElement()
301 ..classes = ['memberItem'] 301 ..classes = ['memberItem']
302 ..children = [ 302 ..children = [
303 new DivElement() 303 new DivElement()
304 ..classes = ['memberName'] 304 ..classes = ['memberName']
305 ..text = 'native memory usage high watermark' 305 ..text = 'zone capacity high watermark'
306 ..title = '''The maximum amount of native memory allocated 306 ..title = '''The maximum amount of native zone memory
307 by the isolate over it\'s life.''', 307 allocated by the isolate over it\'s life.''',
308 new DivElement() 308 new DivElement()
309 ..classes = ['memberValue'] 309 ..classes = ['memberValue']
310 ..text = Utils.formatSize(_isolate.memoryHighWatermark) 310 ..text = Utils.formatSize(_isolate.zoneHighWatermark)
311 ..title = '${_isolate.memoryHighWatermark}B' 311 ..title = '${_isolate.zoneHighWatermark}B'
312 ], 312 ],
313 new BRElement(), 313 new BRElement(),
314 new DivElement() 314 new DivElement()
315 ..classes = ['memberItem'] 315 ..classes = ['memberItem']
316 ..children = [ 316 ..children = [
317 new DivElement() 317 new DivElement()
318 ..classes = ['memberName'] 318 ..classes = ['memberName']
319 ..text = 'libraries (${libraries.length})', 319 ..text = 'libraries (${libraries.length})',
320 new DivElement() 320 new DivElement()
321 ..classes = ['memberValue'] 321 ..classes = ['memberValue']
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 ..children = [ 370 ..children = [
371 new SpanElement() 371 new SpanElement()
372 ..text = '${t.id} ', 372 ..text = '${t.id} ',
373 new CurlyBlockElement(queue: _r.queue) 373 new CurlyBlockElement(queue: _r.queue)
374 ..content = [ 374 ..content = [
375 new DivElement() 375 new DivElement()
376 ..classes = ['indent'] 376 ..classes = ['indent']
377 ..text = 'kind ${t.kindString}', 377 ..text = 'kind ${t.kindString}',
378 new DivElement() 378 new DivElement()
379 ..classes = ['indent'] 379 ..classes = ['indent']
380 ..title = '${t.memoryHighWatermark}B' 380 ..title = '${t.zoneHighWatermark}B'
381 ..text = 381 ..text =
382 'native memory usage high watermark ${Utils.formatSize(t.memoryHig hWatermark)}', 382 'zone capacity high watermark ' +
383 '${Utils.formatSize(t.zoneHighWatermark)}',
383 new DivElement() 384 new DivElement()
384 ..children = t.zones 385 ..classes = ['indent']
385 .map((z) => new DivElement() 386 ..title = '${t.zoneCapacity}B'
386 ..classes = ['indent'] 387 ..text = 'current zone capacity ' +
387 ..children = [ 388 '${Utils.formatSize(t.zoneCapacity)}',
388 new DivElement() 389 ]
389 ..children = [
390 new SpanElement()
391 ..children = [
392 // TODO(bkonyi): zones will always be empty. See
393 // issue #28885.
394 new SpanElement()
395 ..text = 'zone ${index++} ',
396 new CurlyBlockElement(queue: _r.queue)
397 ..content = [
398 new DivElement()
399 ..classes = ['memberList']
400 ..children = [
401 new DivElement()
402 ..classes = ['memberItem']
403 ..children = [
404 new SpanElement()
405 ..classes = ['memberName']
406 ..text = 'used ',
407 new SpanElement()
408 ..classes = ['memberValue']
409 ..title = '${z.used}B'
410 ..text =
411 Utils.formatSize(z.used)
412 ],
413 new DivElement()
414 ..classes = ['memberItem']
415 ..children = [
416 new SpanElement()
417 ..classes = ['memberName']
418 ..text = 'capacity',
419 new SpanElement()
420 ..classes = ['memberValue']
421 ..title = '${z.capacity}B'
422 ..text =
423 Utils.formatSize(z.capacity)
424 ]
425 ]
426 ]
427 ]
428 ]
429 ]
430 )]
431 ]; 390 ];
432 } 391 }
433 392
434 Future _loadExtraData() async { 393 Future _loadExtraData() async {
435 _function = null; 394 _function = null;
436 _rootScript = null; 395 _rootScript = null;
437 final frame = M.topFrame(_isolate.pauseEvent); 396 final frame = M.topFrame(_isolate.pauseEvent);
438 if (frame != null) { 397 if (frame != null) {
439 _function = await _functions.get(_isolate, frame.function.id); 398 _function = await _functions.get(_isolate, frame.function.id);
440 } 399 }
441 if (_isolate.rootLibrary != null) { 400 if (_isolate.rootLibrary != null) {
442 final rootLibrary = 401 final rootLibrary =
443 await _libraries.get(_isolate, _isolate.rootLibrary.id); 402 await _libraries.get(_isolate, _isolate.rootLibrary.id);
444 _rootScript = rootLibrary.rootScript; 403 _rootScript = rootLibrary.rootScript;
445 } 404 }
446 _r.dirty(); 405 _r.dirty();
447 } 406 }
448 } 407 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/models/objects/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698