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

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: More encapsulation of code, better comment. 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
« base/process/process_metrics_win.cc ('K') | « 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..2d26cbf9a5d87a8d59f5dac7d9082e81314a10b2 100644
--- a/components/tracing/common/process_metrics_memory_dump_provider.cc
+++ b/components/tracing/common/process_metrics_memory_dump_provider.cc
@@ -298,6 +298,18 @@ bool ProcessMetricsMemoryDumpProvider::DumpProcessTotals(
nullptr /* shared_bytes */);
if (res)
pmd->process_totals()->SetExtraFieldInBytes("private_bytes", private_bytes);
+#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;
Primiano Tucci (use gerrit) 2016/12/06 17:47:57 If I read the code correctly now within this funct
chengx 2016/12/06 19:40:09 My understanding is that line 268 calls GetWorking
Primiano Tucci (use gerrit) 2016/12/08 16:36:01 Ahh you are right. I confused GetWorkingSetSize()
+ region.byte_stats_proportional_resident = pss_bytes;
+ pmd->process_mmaps()->AddVMRegion(region);
+ }
+ }
+
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
Primiano Tucci (use gerrit) 2016/12/06 17:47:57 plz can you remove the comment from this #endif as
chengx 2016/12/06 19:40:09 Done.
#endif // !defined(OS_IOS)
« base/process/process_metrics_win.cc ('K') | « base/process/process_metrics_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698