mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[observatory] Don't repeat storage of identity hashes in loaded heap snapshots.
TEST=ci Change-Id: I4696f0e943f4b0dd5716ece285650aed85056c37 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265521 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
b11dc51c0d
commit
6d5c966e68
|
@ -260,12 +260,10 @@ abstract class SnapshotObject {
|
|||
|
||||
class _SnapshotObject implements SnapshotObject {
|
||||
final int _id;
|
||||
final int identityHashCode;
|
||||
final _SnapshotGraph _graph;
|
||||
final String label;
|
||||
|
||||
_SnapshotObject._new(this._id, this._graph, this.label)
|
||||
: identityHashCode = _graph._identityHashes![_id];
|
||||
_SnapshotObject._new(this._id, this._graph, this.label);
|
||||
|
||||
bool operator ==(Object other) {
|
||||
if (other is _SnapshotObject) {
|
||||
|
@ -275,6 +273,7 @@ class _SnapshotObject implements SnapshotObject {
|
|||
}
|
||||
|
||||
int get hashCode => _id ^ _graph.hashCode;
|
||||
int get identityHashCode => _graph._identityHashes![_id];
|
||||
|
||||
int get shallowSize => internalSize + externalSize;
|
||||
int get internalSize => _graph._internalSizes![_id];
|
||||
|
|
|
@ -260,12 +260,10 @@ abstract class SnapshotObject {
|
|||
|
||||
class _SnapshotObject implements SnapshotObject {
|
||||
final int _id;
|
||||
final int identityHashCode;
|
||||
final _SnapshotGraph _graph;
|
||||
final String label;
|
||||
|
||||
_SnapshotObject._new(this._id, this._graph, this.label)
|
||||
: identityHashCode = _graph._identityHashes[_id];
|
||||
_SnapshotObject._new(this._id, this._graph, this.label);
|
||||
|
||||
bool operator ==(Object other) {
|
||||
if (other is _SnapshotObject) {
|
||||
|
@ -275,6 +273,7 @@ class _SnapshotObject implements SnapshotObject {
|
|||
}
|
||||
|
||||
int get hashCode => _id ^ _graph.hashCode;
|
||||
int get identityHashCode => _graph._identityHashes[_id];
|
||||
|
||||
int get shallowSize => internalSize + externalSize;
|
||||
int get internalSize => _graph._internalSizes[_id];
|
||||
|
|
Loading…
Reference in a new issue