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

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

Issue 2656723002: Moved isolate high watermark calculations into the Observatory client. (Closed)
Patch Set: Removed extra debug code and updated watermark calculation in client 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..f4491284d0f5f8534f42eef4430736814fad295f 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1645,10 +1645,14 @@ 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 (_memoryHighWatermark == null ||
Cutch 2017/01/25 21:22:33 please initialize _memoryHighWatermark to 0 and dr
bkonyi 2017/01/25 21:51:32 Done.
+ 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