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

Unified Diff: runtime/observatory/lib/src/elements/memory/allocations.dart

Issue 3003903002: Hide internal classes from Memory Profile (Closed)
Patch Set: Address CL comments Created 3 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/memory/allocations.dart
diff --git a/runtime/observatory/lib/src/elements/memory/allocations.dart b/runtime/observatory/lib/src/elements/memory/allocations.dart
index d2bef5b37f3fb02a2743066ac6c3fc52969474f5..449691c8bbc4d61103a32c0458db296dd5bc9a4d 100644
--- a/runtime/observatory/lib/src/elements/memory/allocations.dart
+++ b/runtime/observatory/lib/src/elements/memory/allocations.dart
@@ -109,7 +109,14 @@ class MemoryAllocationsElement extends HtmlElement implements Renderable {
new VirtualCollectionElement(
_createCollectionLine, _updateCollectionLine,
createHeader: _createCollectionHeader,
- items: _profile.members.toList()..sort(_createSorter()),
+ items: _profile.members
+ .where((member) =>
+ member.newSpace.accumulated.instances != 0 ||
+ member.newSpace.current.instances != 0 ||
+ member.oldSpace.accumulated.instances != 0 ||
+ member.oldSpace.current.instances != 0)
+ .toList()
+ ..sort(_createSorter()),
queue: _r.queue)
];
}
@@ -233,6 +240,12 @@ class MemoryAllocationsElement extends HtmlElement implements Renderable {
e.children[1].text = '${_getAccumulatedInstances(item)}';
e.children[2].text = Utils.formatSize(_getCurrentSize(item));
e.children[3].text = '${_getCurrentInstances(item)}';
+ if (item.clazz == null) {
+ e.children[4] = new SpanElement()
+ ..text = item.displayName
+ ..classes = ['name'];
+ return;
+ }
e.children[4] = new ClassRefElement(_isolate, item.clazz, queue: _r.queue)
..classes = ['name'];
Element.clickEvent.forTarget(e.children[4], useCapture: true).listen((e) {
@@ -246,7 +259,8 @@ class MemoryAllocationsElement extends HtmlElement implements Renderable {
Future _refresh({bool gc: false, bool reset: false}) async {
_profile = null;
_r.dirty();
- _profile = await _repository.get(_isolate, gc: gc, reset: reset);
+ _profile =
+ await _repository.get(_isolate, gc: gc, reset: reset, combine: true);
_r.dirty();
}

Powered by Google App Engine
This is Rietveld 408576698