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

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

Issue 2608463002: Added isolate + thread high watermark tracking to Observatory (Closed)
Patch Set: Added tracking of memory usage inside of threads. In addition, the max memory usage is kept track o… Created 4 years 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
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 b9e0f6efd02e0dc4999bc1b9116b021199abc696..1945ce7239767f00c40ddd373fba34ad59540d04 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1507,6 +1507,9 @@ class Isolate extends ServiceObjectOwner implements M.Isolate {
List<Thread> get threads => _threads;
final List<Thread> _threads = new List<Thread>();
+ int get memoryHighWatermark => _memoryHighWatermark;
+ int _memoryHighWatermark;
+
void _loadHeapSnapshot(ServiceEvent event) {
if (_snapshotFetch == null || _snapshotFetch.isClosed) {
// No outstanding snapshot request. Presumably another client asked for a
@@ -1635,6 +1638,8 @@ class Isolate extends ServiceObjectOwner implements M.Isolate {
if(map['threads'] != null) {
threads.addAll(map['threads']);
}
+
+ _memoryHighWatermark = map['isolateMemoryHighWatermark'];
}
Future<TagProfile> updateTagProfile() {
@@ -3072,6 +3077,8 @@ class Thread extends ServiceObject implements M.Thread {
M.ThreadKind _kind;
String get kindString => _kindString;
String _kindString;
+ int get memoryHighWatermark => _memoryHighWatermark;
+ int _memoryHighWatermark;
List<Zone> get zones => _zones;
final List<Zone> _zones = new List<Zone>();
@@ -3109,6 +3116,9 @@ class Thread extends ServiceObject implements M.Thread {
default:
assert(false);
}
+
+ _memoryHighWatermark = map['threadMemoryHighWatermark'];
+
zones.clear();
zoneList.forEach((zone) {
int capacity = zone['capacity'];

Powered by Google App Engine
This is Rietveld 408576698