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

Unified Diff: runtime/observatory/lib/src/elements/native_memory_profiler.dart

Issue 2795473003: [vm service] Collect garbage before getting native allocation samples (Closed)
Patch Set: Add test Created 3 years, 9 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/observatory/tests/service/collect_all_garbage_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/native_memory_profiler.dart
diff --git a/runtime/observatory/lib/src/elements/native_memory_profiler.dart b/runtime/observatory/lib/src/elements/native_memory_profiler.dart
index 688f4fd9928b54e006b0ce00d79aecc7ff1eb712..2820afe90ab423032a7a402ad86d67a8c3394bcf 100644
--- a/runtime/observatory/lib/src/elements/native_memory_profiler.dart
+++ b/runtime/observatory/lib/src/elements/native_memory_profiler.dart
@@ -143,6 +143,9 @@ class NativeMemoryProfileElement extends HtmlElement implements Renderable {
}
Future _request({bool forceFetch: false}) async {
+ for (Isolate isolate in vm.isolates) {
+ await isolate.invokeRpc("_collectAllGarbage", {});
+ }
_progress = null;
_progressStream = _profiles.get(_vm, _tag, forceFetch: forceFetch);
_r.dirty();
« no previous file with comments | « no previous file | runtime/observatory/tests/service/collect_all_garbage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698