Double counting rss_anon_bytes when computing private footprint |
||
Issue descriptionA refactor (crrev.com/c/555497) I made to ProcessMetricsMemoryDumpProvider which split logic out by platform introduced a bug. The bug caused us to double count rss anon bytes and never count vm swap bytes when computing the 'private footprint' UMA on all processes on Linux and Android. This produced a large increase in those UMA metrics. UMA: https://uma.googleplex.com/timeline_v2?sid=0ab9c44731051a88ec6911ce5879cacd Commit: https://chromium.googlesource.com/chromium/src/+/36eedd751a6104eea2d3d25c5a8ff25b9bd13510 Before: - footprint.rss_anon_bytes = (resident_pages - shared_pages) * page_size; - footprint.vm_swap_bytes = process_metrics_->GetVmSwapBytes(); - pmd->process_totals()->SetPlatformPrivateFootprint(footprint); After: + const static size_t page_size = base::GetPageSize(); + uint64_t rss_anon_bytes = (resident_pages - shared_pages) * page_size; + uint64_t vm_swap_bytes = (resident_pages - shared_pages) * page_size;
,
Jul 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd87bf3514c2d887d21c0e21ef466b560c976ed7 commit bd87bf3514c2d887d21c0e21ef466b560c976ed7 Author: Hector Dearman <hjd@google.com> Date: Fri Jul 14 12:07:01 2017 memory-infra: Stop double counting rss_anon_bytes when computing private footprint A refactor (crrev.com/c/555497) I made to ProcessMetricsMemoryDumpProvider which split logic out by platform introduced a bug. The bug caused us to double count rss anon bytes and never count vm swap bytes when computing the 'private footprint' UMA on all processes on Linux and Android. This produced a large increase in those UMA metrics. This fixes the bug. Bug: 742958 Change-Id: I893774e95154f50be0f30698b17c01ec4bfbcb1d Reviewed-on: https://chromium-review.googlesource.com/571804 Commit-Queue: Hector Dearman <hjd@chromium.org> Reviewed-by: Primiano Tucci <primiano@chromium.org> Cr-Commit-Position: refs/heads/master@{#486742} [modify] https://crrev.com/bd87bf3514c2d887d21c0e21ef466b560c976ed7/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8779e5365c7b389822075b7eb7b35697b36d9954 commit 8779e5365c7b389822075b7eb7b35697b36d9954 Author: Hector Dearman <hjd@google.com> Date: Wed Jul 19 12:37:34 2017 memory-infra: Add an end-to-end test of private footprint Bug: 742958 Change-Id: I2908ad0794835b1ad002da3a4b9be7c3578cdce5 Reviewed-on: https://chromium-review.googlesource.com/574029 Commit-Queue: Hector Dearman <hjd@chromium.org> Reviewed-by: Primiano Tucci <primiano@chromium.org> Cr-Commit-Position: refs/heads/master@{#487834} [add] https://crrev.com/8779e5365c7b389822075b7eb7b35697b36d9954/content/browser/tracing/memory_instrumentation_browsertest.cc [modify] https://crrev.com/8779e5365c7b389822075b7eb7b35697b36d9954/content/test/BUILD.gn [modify] https://crrev.com/8779e5365c7b389822075b7eb7b35697b36d9954/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc [modify] https://crrev.com/8779e5365c7b389822075b7eb7b35697b36d9954/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/efe60ec81ccfea801c059f87d5382200f30e7405 commit efe60ec81ccfea801c059f87d5382200f30e7405 Author: Hector Dearman <hjd@chromium.org> Date: Wed Jul 19 14:51:52 2017 Revert "memory-infra: Add an end-to-end test of private footprint" This reverts commit 8779e5365c7b389822075b7eb7b35697b36d9954. Reason for revert: Breaks a test: https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20MSan%20Tests/builds/2673 Original change's description: > memory-infra: Add an end-to-end test of private footprint > > Bug: 742958 > Change-Id: I2908ad0794835b1ad002da3a4b9be7c3578cdce5 > Reviewed-on: https://chromium-review.googlesource.com/574029 > Commit-Queue: Hector Dearman <hjd@chromium.org> > Reviewed-by: Primiano Tucci <primiano@chromium.org> > Cr-Commit-Position: refs/heads/master@{#487834} TBR=primiano@chromium.org,erikchen@chromium.org,hjd@chromium.org Change-Id: I3d309673b0cf4ce489d6ee535975ea1bc049e782 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 742958 Reviewed-on: https://chromium-review.googlesource.com/576184 Reviewed-by: Hector Dearman <hjd@chromium.org> Commit-Queue: Hector Dearman <hjd@chromium.org> Cr-Commit-Position: refs/heads/master@{#487860} [delete] https://crrev.com/ab08362cb469d48e79bee165b56d7bf962382490/content/browser/tracing/memory_instrumentation_browsertest.cc [modify] https://crrev.com/efe60ec81ccfea801c059f87d5382200f30e7405/content/test/BUILD.gn [modify] https://crrev.com/efe60ec81ccfea801c059f87d5382200f30e7405/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc [modify] https://crrev.com/efe60ec81ccfea801c059f87d5382200f30e7405/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/67be650f82d869a93fddada49f7677d15068a643 commit 67be650f82d869a93fddada49f7677d15068a643 Author: Hector Dearman <hjd@google.com> Date: Wed Jul 19 18:31:19 2017 Reland: memory-infra: Add an end-to-end test of private footprint Reland https://chromium-review.googlesource.com/c/574029 this time with MSAN disabled. This reverts commit efe60ec81ccfea801c059f87d5382200f30e7405. Bug: 742958 Change-Id: I6fb6d84ce3686aac033a24a2b3dc790d81d8e44e Reviewed-on: https://chromium-review.googlesource.com/577852 Commit-Queue: Hector Dearman <hjd@chromium.org> Commit-Queue: Primiano Tucci <primiano@chromium.org> Reviewed-by: Primiano Tucci <primiano@chromium.org> Cr-Commit-Position: refs/heads/master@{#487926} [add] https://crrev.com/67be650f82d869a93fddada49f7677d15068a643/content/browser/tracing/memory_instrumentation_browsertest.cc [modify] https://crrev.com/67be650f82d869a93fddada49f7677d15068a643/content/test/BUILD.gn [modify] https://crrev.com/67be650f82d869a93fddada49f7677d15068a643/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc [modify] https://crrev.com/67be650f82d869a93fddada49f7677d15068a643/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h
,
Jul 20 2017
This is fixed now and an end-to-end test has been added which would have caught this bug.
,
Jul 21 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by primiano@chromium.org
, Jul 14 2017