OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 heap_snapshot; | 5 part of heap_snapshot; |
6 | 6 |
7 class HeapSnapshot implements M.HeapSnapshot { | 7 class HeapSnapshot implements M.HeapSnapshot { |
8 ObjectGraph graph; | 8 ObjectGraph graph; |
9 DateTime timestamp; | 9 DateTime timestamp; |
10 int get objects => graph.vertexCount; | 10 int get objects => graph.vertexCount; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 Iterable<HeapSnapshotClassOutbound> _outbounds; | 190 Iterable<HeapSnapshotClassOutbound> _outbounds; |
191 Iterable<HeapSnapshotClassOutbound> get outbounds { | 191 Iterable<HeapSnapshotClassOutbound> get outbounds { |
192 if (_outbounds != null) { | 192 if (_outbounds != null) { |
193 return _outbounds; | 193 return _outbounds; |
194 } else { | 194 } else { |
195 // It is important to keep the template. | 195 // It is important to keep the template. |
196 // https://github.com/dart-lang/sdk/issues/27144 | 196 // https://github.com/dart-lang/sdk/issues/27144 |
197 return _outbounds = new List<HeapSnapshotClassOutbound>.unmodifiable( | 197 return _outbounds = new List<HeapSnapshotClassOutbound>.unmodifiable( |
198 outgoingEdges.values.map((edge) { | 198 outgoingEdges.values.map((edge) { |
199 return new HeapSnapshotClassInbound(this, edge); | 199 return new HeapSnapshotClassOutbound(this, edge); |
200 }) | 200 }) |
201 ); | 201 ); |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 MergedVertex(this.isolate, this.cid); | 205 MergedVertex(this.isolate, this.cid); |
206 } | 206 } |
207 | 207 |
208 class HeapSnapshotClassInbound implements M.HeapSnapshotClassInbound { | 208 class HeapSnapshotClassInbound implements M.HeapSnapshotClassInbound { |
209 final MergedVertex vertex; | 209 final MergedVertex vertex; |
(...skipping 11 matching lines...) Expand all Loading... |
221 final MergedVertex vertex; | 221 final MergedVertex vertex; |
222 final MergedEdge edge; | 222 final MergedEdge edge; |
223 S.Class get target => edge.sourceVertex != vertex ? edge.sourceVertex.clazz | 223 S.Class get target => edge.sourceVertex != vertex ? edge.sourceVertex.clazz |
224 : edge.targetVertex.clazz; | 224 : edge.targetVertex.clazz; |
225 int get count => edge.count; | 225 int get count => edge.count; |
226 int get shallowSize => edge.shallowSize; | 226 int get shallowSize => edge.shallowSize; |
227 int get retainedSize => edge.retainedSize; | 227 int get retainedSize => edge.retainedSize; |
228 | 228 |
229 HeapSnapshotClassOutbound(this.vertex, this.edge); | 229 HeapSnapshotClassOutbound(this.vertex, this.edge); |
230 } | 230 } |
OLD | NEW |