Commit 3d053506 authored by kschimpf's avatar kschimpf Committed by Commit bot

Don't report array buffer allocations less than 1 Mb.

History has shown that 99.93% (or more) of all memory allocations are less
than 1 megabyte, and they all appear in the same UMA stat entry.

To give perspective, the entry for <= 1Mb is about 20,000 times larger
than any other entry in the table. This makes the distribution in the
table hard to see.

And, for allocation failures at this size, the percentage of failures
(when compared to number of requests) is soo small (millions to one)
that little data can be gleamed from the <= 1Mb entry.

Note: requires CL https://codereview.chromium.org/2867483002

BUG=chrome:704922
R=bradnelson@chromium.org, bbudge@chromium.org, isherman@chromium.org

Review-Url: https://codereview.chromium.org/2856663002
Cr-Commit-Position: refs/heads/master@{#45148}
parent 47a8e354
......@@ -939,7 +939,8 @@ class RuntimeCallTimerScope {
51) \
HR(wasm_functions_per_wasm_module, V8.WasmFunctionsPerModule.wasm, 1, \
100000, 51) \
HR(array_buffer_big_allocations, V8.ArrayBufferBigAllocations, 0, 4096, 13) \
HR(array_buffer_big_allocations, V8.ArrayBufferLargeAllocations, 0, 4096, \
13) \
HR(array_buffer_new_size_failures, V8.ArrayBufferNewSizeFailures, 0, 4096, 13)
#define HISTOGRAM_TIMER_LIST(HT) \
......
......@@ -19560,6 +19560,7 @@ bool JSArrayBuffer::SetupAllocatingData(Handle<JSArrayBuffer> array_buffer,
// Prevent creating array buffers when serializing.
DCHECK(!isolate->serializer_enabled());
if (allocated_length != 0) {
if (allocated_length >= MB)
isolate->counters()->array_buffer_big_allocations()->AddSample(
ConvertToMb(allocated_length));
if (initialize) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment