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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 2656723002: Moved isolate high watermark calculations into the Observatory client. (Closed)
Patch Set: Initialized _memoryHighWatermark in object.dart Created 3 years, 11 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/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index ccc9054597b92b533b9fa16d6c53f5a9fdc20d47..74a99ab385916efe704947feba59a7d4f7ebff54 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1508,7 +1508,7 @@ class Isolate extends ServiceObjectOwner implements M.Isolate {
final List<Thread> _threads = new List<Thread>();
int get memoryHighWatermark => _memoryHighWatermark;
- int _memoryHighWatermark;
+ int _memoryHighWatermark = 0;
int get numZoneHandles => _numZoneHandles;
int _numZoneHandles;
@@ -1645,10 +1645,13 @@ class Isolate extends ServiceObjectOwner implements M.Isolate {
threads.addAll(map['_threads']);
}
- _memoryHighWatermark = int.parse(map['_memoryHighWatermark']);
+ int currentMemoryHighWatermark = 0;
+ for (var i = 0; i < threads.length; i++) {
+ currentMemoryHighWatermark += threads[i].memoryHighWatermark;
+ }
- if (map['threads'] != null) {
- threads.addAll(map['threads']);
+ if (currentMemoryHighWatermark > _memoryHighWatermark) {
+ _memoryHighWatermark = currentMemoryHighWatermark;
}
_numZoneHandles = map['_numZoneHandles'];
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698