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

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: 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..c9b8877a4b1413d99fbdfbfc2df99f164a10ac70 100644
--- a/chrome/browser/task_manager/sampling/task_group_sampler.cc
+++ b/chrome/browser/task_manager/sampling/task_group_sampler.cc
@@ -126,14 +126,13 @@ MemoryUsageStats TaskGroupSampler::RefreshMemoryUsage() {
MemoryUsageStats memory_usage;
#if defined(OS_MACOSX)
- memory_usage.physical_bytes =
Mark Mentovai 2017/03/13 18:13:33 Leaving this alone was nice because it consolidate
ssid 2017/03/13 18:44:55 Yes, the main consumer of this number I'd expect w
Mark Mentovai 2017/03/13 18:48:03 ssid wrote:
ssid 2017/03/13 18:59:14 Um sorry, yes I just felt showing different number
erikchen 2017/03/13 21:00:41 Calculating private/shared bytes has a performance
- 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)) {
memory_usage.private_bytes = static_cast<int64_t>(private_bytes);
memory_usage.shared_bytes = static_cast<int64_t>(shared_bytes);
+ memory_usage.physical_bytes =
+ memory_usage.private_bytes + memory_usage.shared_bytes;
}
#else
// Refreshing the physical/private/shared memory at one shot.

Powered by Google App Engine
This is Rietveld 408576698