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

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

Issue 2277073002: Using HeapSnapshotClassOutbound for outbound references (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 | « no previous file | 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) 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698