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

Unified Diff: runtime/observatory/lib/object_graph.dart

Issue 1161553013: Address hints in the Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/object_graph.dart
diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart
index a616043bb55cb03a98548b978ed77da45cee3e3f..00355803aa7818925f2d804e417a1e031895d59a 100644
--- a/runtime/observatory/lib/object_graph.dart
+++ b/runtime/observatory/lib/object_graph.dart
@@ -58,6 +58,8 @@ class ObjectVertex {
ObjectVertex._(this._id, this._graph);
+ bool get isRoot => _id == 1;
+
bool operator ==(other) => _id == other._id && _graph == other._graph;
int get hashCode => _id;
@@ -186,7 +188,7 @@ class ObjectGraph {
var result = _mostRetained;
if (classId != null) {
- result = result.where((u) => u.classId == classId);
+ result = result.where((u) => u.vmCid == classId);
}
if (limit != null) {
result = result.take(limit);
@@ -254,8 +256,8 @@ class ObjectGraph {
while (stream.pendingBytes > 0) {
positions[id] = stream.position;
var addr = stream.readUnsigned();
- var shallowSize = stream.readUnsigned();
- var cid = stream.readUnsigned();
+ stream.readUnsigned(); // shallowSize
+ stream.readUnsigned(); // cid
addrToId[addr] = id;
var succAddr = stream.readUnsigned();
@@ -409,8 +411,7 @@ class ObjectGraph {
// Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy
void _buildDominators() {
var N = _N;
- var E = _E;
- var addrToId = _addrToId;
+
var postOrder = _postOrderOrdinals;
var postOrderIndex = _postOrderIndices;
var firstPreds = _firstPreds;
@@ -486,7 +487,6 @@ class ObjectGraph {
void _calculateRetainedSizes() {
var N = _N;
- var E = _E;
var size = 0;
var positions = _positions;
« no previous file with comments | « no previous file | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698