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

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

Issue 2276203002: Fixed template in HeapSnapshotClassReferences implementation (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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 int retainedSize = 0; 170 int retainedSize = 0;
171 171
172 List<MergedEdge> incomingEdges = new List<MergedEdge>(); 172 List<MergedEdge> incomingEdges = new List<MergedEdge>();
173 Map<int, MergedEdge> outgoingEdges = new Map<int, MergedEdge>(); 173 Map<int, MergedEdge> outgoingEdges = new Map<int, MergedEdge>();
174 174
175 Iterable<HeapSnapshotClassInbound> _inbounds; 175 Iterable<HeapSnapshotClassInbound> _inbounds;
176 Iterable<HeapSnapshotClassInbound> get inbounds { 176 Iterable<HeapSnapshotClassInbound> get inbounds {
177 if (_inbounds != null) { 177 if (_inbounds != null) {
178 return _inbounds; 178 return _inbounds;
179 } else { 179 } else {
180 return _inbounds = new List.unmodifiable( 180 // It is important to keep the template.
181 // https://github.com/dart-lang/sdk/issues/27144
182 return _inbounds = new List<HeapSnapshotClassInbound>.unmodifiable(
181 incomingEdges.map((edge) { 183 incomingEdges.map((edge) {
182 return new HeapSnapshotClassInbound(this, edge); 184 return new HeapSnapshotClassInbound(this, edge);
183 }) 185 })
184 ); 186 );
185 } 187 }
186 } 188 }
187 189
188 Iterable<HeapSnapshotClassOutbound> _outbounds; 190 Iterable<HeapSnapshotClassOutbound> _outbounds;
189 Iterable<HeapSnapshotClassOutbound> get outbounds { 191 Iterable<HeapSnapshotClassOutbound> get outbounds {
190 if (_outbounds != null) { 192 if (_outbounds != null) {
191 return _outbounds; 193 return _outbounds;
192 } else { 194 } else {
193 return _outbounds = new List.unmodifiable( 195 // It is important to keep the template.
196 // https://github.com/dart-lang/sdk/issues/27144
197 return _outbounds = new List<HeapSnapshotClassOutbound>.unmodifiable(
194 outgoingEdges.values.map((edge) { 198 outgoingEdges.values.map((edge) {
195 return new HeapSnapshotClassInbound(this, edge); 199 return new HeapSnapshotClassInbound(this, edge);
Cutch 2016/08/24 23:00:46 Should this be HeapSNapshotClassOutbound?
cbernaschina 2016/08/24 23:04:36 see https://codereview.chromium.org/2277073002/
196 }) 200 })
197 ); 201 );
198 } 202 }
199 } 203 }
200 204
201 MergedVertex(this.isolate, this.cid); 205 MergedVertex(this.isolate, this.cid);
202 } 206 }
203 207
204 class HeapSnapshotClassInbound implements M.HeapSnapshotClassInbound { 208 class HeapSnapshotClassInbound implements M.HeapSnapshotClassInbound {
205 final MergedVertex vertex; 209 final MergedVertex vertex;
(...skipping 11 matching lines...) Expand all
217 final MergedVertex vertex; 221 final MergedVertex vertex;
218 final MergedEdge edge; 222 final MergedEdge edge;
219 S.Class get target => edge.sourceVertex != vertex ? edge.sourceVertex.clazz 223 S.Class get target => edge.sourceVertex != vertex ? edge.sourceVertex.clazz
220 : edge.targetVertex.clazz; 224 : edge.targetVertex.clazz;
221 int get count => edge.count; 225 int get count => edge.count;
222 int get shallowSize => edge.shallowSize; 226 int get shallowSize => edge.shallowSize;
223 int get retainedSize => edge.retainedSize; 227 int get retainedSize => edge.retainedSize;
224 228
225 HeapSnapshotClassOutbound(this.vertex, this.edge); 229 HeapSnapshotClassOutbound(this.vertex, this.edge);
226 } 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