Revert "Record memory used by Blink Heap across all renderers to UMA."
This reverts commit 8b32698464d1a70006a66b3e5582a010e8b9fb09.
Reason for revert:
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/132360/test-results
Original change's description:
> Record memory used by Blink Heap across all renderers to UMA.
>
> The data will be used to decide whether it's worthwhile to implement
> Blink heap compaction.
>
> Bug: 1458562
> Change-Id: Idc7f75db792437979be8f6b0dcc9428bd6a475d2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4650274
> Reviewed-by: Benoit Lize <lizeb@chromium.org>
> Commit-Queue: Benoit Lize <lizeb@chromium.org>
> Auto-Submit: Francois Pierre Doray <fdoray@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1164249}
Bug: 1458562
Change-Id: I6fad698de33edb93724288d4f6b3854ea8236ea8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4657201
Owners-Override: Matt Reichhoff <mreichhoff@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Matt Reichhoff <mreichhoff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1164301}
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter.cc b/chrome/browser/metrics/process_memory_metrics_emitter.cc
index 0c4da5c..32a5256 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter.cc
@@ -1233,8 +1233,6 @@
#endif // BUILDFLAG(IS_ANDROID)
uint32_t renderer_private_footprint_total_kb = 0;
uint32_t renderer_malloc_total_kb = 0;
- uint32_t renderer_blink_gc_total_kb = 0;
- uint32_t renderer_blink_gc_fragmentation_total_kb = 0;
uint32_t shared_footprint_total_kb = 0;
uint32_t resident_set_total_kb = 0;
uint64_t tiles_total_memory = 0;
@@ -1319,20 +1317,9 @@
single_page_info = &process_info.page_infos[0];
}
}
-
- // Sum malloc memory from all renderers.
renderer_malloc_total_kb +=
pmd.GetMetric("malloc", "effective_size").value_or(0) / kKiB;
- // Sum Blink memory from all renderers.
- const uint64_t blink_gc_bytes =
- pmd.GetMetric("blink_gc", kEffectiveSize).value_or(0);
- const uint64_t blink_gc_allocated_objects_bytes =
- pmd.GetMetric("blink_gc", kAllocatedObjectsSize).value_or(0);
- renderer_blink_gc_total_kb += blink_gc_bytes / kKiB;
- renderer_blink_gc_fragmentation_total_kb +=
- (blink_gc_bytes - blink_gc_allocated_objects_bytes) / kKiB;
-
int number_of_extensions = GetNumberOfExtensions(pmd.pid());
EmitRendererMemoryMetrics(
pmd, single_page_info, GetUkmRecorder(), number_of_extensions,
@@ -1436,11 +1423,6 @@
renderer_private_footprint_total_kb / kKiB);
UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Total.RendererMalloc",
renderer_malloc_total_kb / kKiB);
- UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Total.RendererBlinkGC",
- renderer_blink_gc_total_kb / kKiB);
- UMA_HISTOGRAM_MEMORY_LARGE_MB(
- "Memory.Total.RendererBlinkGC.Fragmentation",
- renderer_blink_gc_fragmentation_total_kb / kKiB);
UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Total.SharedMemoryFootprint",
shared_footprint_total_kb / kKiB);
UMA_HISTOGRAM_MEMORY_MEDIUM_MB("Memory.Total.TileMemory",
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
index f1a5b67..2e1957c 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
@@ -318,10 +318,6 @@
histogram_tester, count, ValueRestriction::ABOVE_ZERO);
CheckMemoryMetric("Memory.Total.RendererMalloc", histogram_tester, count,
ValueRestriction::ABOVE_ZERO);
- CheckMemoryMetric("Memory.Total.RendererBlinkGC", histogram_tester, count,
- ValueRestriction::ABOVE_ZERO);
- CheckMemoryMetric("Memory.Total.RendererBlinkGC.Fragmentation",
- histogram_tester, count, ValueRestriction::ABOVE_ZERO);
// Shared memory footprint can be below 1 MB, which is reported as zero.
CheckMemoryMetric("Memory.Total.SharedMemoryFootprint", histogram_tester,
count, ValueRestriction::NONE);
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
index 01d88614..ae4b2f0 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
@@ -208,9 +208,6 @@
metrics_mb_or_count["PartitionAlloc"] * 1024 * 1024);
SetAllocatorDumpMetric(pmd, "blink_gc", "effective_size",
metrics_mb_or_count["BlinkGC"] * 1024 * 1024);
- SetAllocatorDumpMetric(
- pmd, "blink_gc", "allocated_objects_size",
- metrics_mb_or_count["BlinkGC.AllocatedObjects"] * 1024 * 1024);
SetAllocatorDumpMetric(pmd, "v8", "effective_size",
metrics_mb_or_count["V8"] * 1024 * 1024);
SetAllocatorDumpMetric(
@@ -336,8 +333,6 @@
constexpr int kTestRendererPrivateMemoryFootprint = 130;
constexpr int kTestRendererMalloc = 120;
-constexpr int kTestRendererBlinkGC = 150;
-constexpr int kTestRendererBlinkGCFragmentation = 10;
constexpr int kTestRendererSharedMemoryFootprint = 135;
constexpr int kNativeLibraryResidentMemoryFootprint = 27560;
constexpr int kNativeLibraryResidentNotOrderedCodeFootprint = 12345;
@@ -353,8 +348,7 @@
{"Resident", kTestRendererResidentSet}, {"Malloc", kTestRendererMalloc},
{"PrivateMemoryFootprint", kTestRendererPrivateMemoryFootprint},
{"SharedMemoryFootprint", kTestRendererSharedMemoryFootprint},
- {"PartitionAlloc", 140}, {"BlinkGC", 150},
- {"BlinkGC.AllocatedObjects", 140}, {"V8", 160},
+ {"PartitionAlloc", 140}, {"BlinkGC", 150}, {"V8", 160},
{"V8.AllocatedObjects", 70}, {"V8.Main", 100},
{"V8.Main.AllocatedObjects", 30}, {"V8.Main.Heap", 98},
{"V8.Main.GlobalHandles", 3},
@@ -936,8 +930,6 @@
histograms.ExpectTotalCount("Memory.Total.PrivateMemoryFootprint", 0);
histograms.ExpectTotalCount("Memory.Total.RendererPrivateMemoryFootprint", 0);
histograms.ExpectTotalCount("Memory.Total.RendererMalloc", 0);
- histograms.ExpectTotalCount("Memory.Total.RendererBlinkGC", 0);
- histograms.ExpectTotalCount("Memory.Total.RendererBlinkGC.Fragmentation", 0);
histograms.ExpectTotalCount("Memory.Total.SharedMemoryFootprint", 0);
histograms.ExpectTotalCount("Memory.Total.ResidentSet", 0);
histograms.ExpectTotalCount(
@@ -986,10 +978,6 @@
2 * kTestRendererPrivateMemoryFootprint, 1);
histograms.ExpectUniqueSample("Memory.Total.RendererMalloc",
2 * kTestRendererMalloc, 1);
- histograms.ExpectUniqueSample("Memory.Total.RendererBlinkGC",
- 2 * kTestRendererBlinkGC, 1);
- histograms.ExpectUniqueSample("Memory.Total.RendererBlinkGC.Fragmentation",
- 2 * kTestRendererBlinkGCFragmentation, 1);
histograms.ExpectUniqueSample("Memory.Total.SharedMemoryFootprint",
2 * kTestRendererSharedMemoryFootprint, 1);
histograms.ExpectUniqueSample("Memory.Total.ResidentSet",
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml
index 290288e..c34a2a3 100644
--- a/tools/metrics/histograms/metadata/memory/histograms.xml
+++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -2532,31 +2532,6 @@
</summary>
</histogram>
-<histogram name="Memory.Total.RendererBlinkGC" units="MB"
- expires_after="2023-12-31">
- <owner>fdoray@chromium.org</owner>
- <owner>lizeb@chromium.org</owner>
- <summary>
- Memory from the Blink heap in all renderer processes.
-
- Recorded at Poisson sampled time intervals with a mean of 5 minutes on
- Android and 30 minutes on other platforms.
- </summary>
-</histogram>
-
-<histogram name="Memory.Total.RendererBlinkGC.Fragmentation" units="MB"
- expires_after="2023-12-31">
- <owner>fdoray@chromium.org</owner>
- <owner>lizeb@chromium.org</owner>
- <summary>
- Memory from the Blink heap which is not used by allocated objects in all
- renderer processes.
-
- Recorded at Poisson sampled time intervals with a mean of 5 minutes on
- Android and 30 minutes on other platforms.
- </summary>
-</histogram>
-
<histogram name="Memory.Total.RendererMalloc" units="MB"
expires_after="2022-10-01">
<owner>keishi@chromium.org</owner>