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

Unified Diff: chrome/browser/task_manager/sampling/task_group_sampler.cc

Issue 2740423002: mac: Fix calulation for number of resident pages in a process. (Closed)
Patch Set: comments from mark. 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
Index: chrome/browser/task_manager/sampling/task_group_sampler.cc
diff --git a/chrome/browser/task_manager/sampling/task_group_sampler.cc b/chrome/browser/task_manager/sampling/task_group_sampler.cc
index 9cf7872049e0c03b79a91670b51dbab995f02a59..3a1afc1bc1c5224441b9d1fbd008318bde7692db 100644
--- a/chrome/browser/task_manager/sampling/task_group_sampler.cc
+++ b/chrome/browser/task_manager/sampling/task_group_sampler.cc
@@ -126,14 +126,14 @@ MemoryUsageStats TaskGroupSampler::RefreshMemoryUsage() {
MemoryUsageStats memory_usage;
#if defined(OS_MACOSX)
- memory_usage.physical_bytes =
- static_cast<int64_t>(process_metrics_->GetWorkingSetSize());
-
size_t private_bytes = 0;
size_t shared_bytes = 0;
- if (process_metrics_->GetMemoryBytes(&private_bytes, &shared_bytes)) {
+ size_t resident_bytes = 0;
+ if (process_metrics_->GetMemoryBytes(&private_bytes, &shared_bytes,
+ &resident_bytes)) {
memory_usage.private_bytes = static_cast<int64_t>(private_bytes);
memory_usage.shared_bytes = static_cast<int64_t>(shared_bytes);
+ memory_usage.physical_bytes = resident_bytes;
}
#else
// Refreshing the physical/private/shared memory at one shot.
« no previous file with comments | « base/process/process_metrics_win.cc ('k') | components/tracing/common/process_metrics_memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698