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

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

Issue 2340883002: Observatory: Fix allocation profile CVS export. Fix heap snapshot in/out reference counts. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « runtime/observatory/lib/src/elements/allocation_profile.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 5 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
6 // for details. All rights reserved. Use of this source code is governed by a 6 // for details. All rights reserved. Use of this source code is governed by a
7 // BSD-style license that can be found in the LICENSE file. 7 // BSD-style license that can be found in the LICENSE file.
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:html'; 10 import 'dart:html';
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 element.children[4] = new ClassRefElement(_isolate, item.clazz, 339 element.children[4] = new ClassRefElement(_isolate, item.clazz,
340 queue: _r.queue)..classes = ['name']; 340 queue: _r.queue)..classes = ['name'];
341 } else if (item is Iterable) { 341 } else if (item is Iterable) {
342 element.children[0].text = ''; 342 element.children[0].text = '';
343 if (item.isNotEmpty) { 343 if (item.isNotEmpty) {
344 element.children[2].text = _tree.isExpanded(item) ? '▼' : '►'; 344 element.children[2].text = _tree.isExpanded(item) ? '▼' : '►';
345 } else { 345 } else {
346 element.children[2].text = ''; 346 element.children[2].text = '';
347 } 347 }
348 element.children[3].text = ''; 348 element.children[3].text = '';
349 int references = 0;
350 for (var referenceGroup in item) {
351 references += referenceGroup.count;
352 }
349 if (item is Iterable<M.HeapSnapshotClassInbound>) { 353 if (item is Iterable<M.HeapSnapshotClassInbound>) {
350 element.children[4] = new SpanElement()..classes = ['name'] 354 element.children[4] = new SpanElement()..classes = ['name']
351 ..text = '${item.length} Incoming references'; 355 ..text = '$references incoming references';
352 } else { 356 } else {
353 element.children[4] = new SpanElement()..classes = ['name'] 357 element.children[4] = new SpanElement()..classes = ['name']
354 ..text = '${item.length} Outgoing references'; 358 ..text = '$references outgoing references';
355 } 359 }
356 } else { 360 } else {
357 element.children[0].text = ''; 361 element.children[0].text = '';
358 element.children[2].text = ''; 362 element.children[2].text = '';
359 element.children[3].text = ''; 363 element.children[3].text = '';
360 element.children[4] = new SpanElement()..classes = ['name']; 364 element.children[4] = new SpanElement()..classes = ['name'];
361 if (item is M.HeapSnapshotClassInbound){ 365 if (item is M.HeapSnapshotClassInbound){
362 element.children[3].text = 366 element.children[3].text =
363 '${item.count} references from instances of '; 367 '${item.count} references from instances of ';
364 element.children[4].children = [ 368 element.children[4].children = [
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 selected: _mode == mode) 407 selected: _mode == mode)
404 ..text = modeToString(mode); 408 ..text = modeToString(mode);
405 }).toList(growable: false) 409 }).toList(growable: false)
406 ..onChange.listen((_) { 410 ..onChange.listen((_) {
407 _mode = HeapSnapshotTreeMode.values[s.selectedIndex]; 411 _mode = HeapSnapshotTreeMode.values[s.selectedIndex];
408 _r.dirty(); 412 _r.dirty();
409 }) 413 })
410 ]; 414 ];
411 } 415 }
412 } 416 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/allocation_profile.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698