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

Unified Diff: runtime/bin/main.cc

Issue 2997013002: Refactor of the GetEmbedderInformation APIs (Closed)
Patch Set: Address comments Created 3 years, 4 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 | « runtime/bin/embedded_dart_io.cc ('k') | runtime/bin/process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index ffbc2e738135cdef6550cf493f225e9792d5d9a9..a031e6f07504a55e2d93f289d9e4b04d36d89720 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -1360,13 +1360,9 @@ static bool FileModifiedCallback(const char* url, int64_t since) {
}
static void EmbedderInformationCallback(Dart_EmbedderInformation* info) {
- int64_t max_rss = Process::MaxRSS();
- int64_t current_rss = Process::CurrentRSS();
-
info->version = DART_EMBEDDER_INFORMATION_CURRENT_VERSION;
info->name = "Dart VM";
- info->max_rss = max_rss >= 0 ? max_rss : 0;
- info->current_rss = current_rss >= 0 ? current_rss : 0;
+ Process::GetRSSInformation(&(info->max_rss), &(info->current_rss));
}
static void GenerateAppAOTSnapshot() {
« no previous file with comments | « runtime/bin/embedded_dart_io.cc ('k') | runtime/bin/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698