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

Unified Diff: components/tracing/common/process_metrics_memory_dump_provider.cc

Issue 2549803003: Add function to compute proportional set size for OS_WIN (Closed)
Patch Set: Fix compile error for std::min 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
« no previous file with comments | « base/process/process_metrics_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/common/process_metrics_memory_dump_provider.cc
diff --git a/components/tracing/common/process_metrics_memory_dump_provider.cc b/components/tracing/common/process_metrics_memory_dump_provider.cc
index d2c00c347f0db3f7f9b13286e2af3edc4ac089b3..71c929f10fb092f5771bf42d70a2512d4fdbb818 100644
--- a/components/tracing/common/process_metrics_memory_dump_provider.cc
+++ b/components/tracing/common/process_metrics_memory_dump_provider.cc
@@ -298,7 +298,20 @@ bool ProcessMetricsMemoryDumpProvider::DumpProcessTotals(
nullptr /* shared_bytes */);
if (res)
pmd->process_totals()->SetExtraFieldInBytes("private_bytes", private_bytes);
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#elif defined(OS_WIN)
+ if (args.level_of_detail ==
+ base::trace_event::MemoryDumpLevelOfDetail::DETAILED) {
+ uint64_t pss_bytes = 0;
+ bool res = process_metrics_->GetProportionalSetSizeBytes(&pss_bytes);
+ if (res) {
+ base::trace_event::ProcessMemoryMaps::VMRegion region;
+ region.byte_stats_proportional_resident = pss_bytes;
+ pmd->process_mmaps()->AddVMRegion(region);
+ pmd->set_has_process_mmaps();
+ }
+ }
+
+#endif
#endif // !defined(OS_IOS)
pmd->process_totals()->set_resident_set_bytes(rss_bytes);
« no previous file with comments | « base/process/process_metrics_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698