Commit 86f95d87 authored by kschimpf's avatar kschimpf Committed by Commit Bot

Add V8 shared array allocation sizes histogram.

Add histogram to track sizes of share array buffers in Wasm/Js.

Associated with Chrome CL: https://codereview.chromium.org/2898953003

BUG=chromium:725309

Review-Url: https://codereview.chromium.org/2902773002
Cr-Commit-Position: refs/heads/master@{#45577}
parent 2a9965bd
......@@ -977,7 +977,9 @@ class RuntimeCallTimerScope {
100000, 51) \
HR(array_buffer_big_allocations, V8.ArrayBufferLargeAllocations, 0, 4096, \
13) \
HR(array_buffer_new_size_failures, V8.ArrayBufferNewSizeFailures, 0, 4096, 13)
HR(array_buffer_new_size_failures, V8.ArrayBufferNewSizeFailures, 0, 4096, \
13) \
HR(shared_array_allocations, V8.SharedArrayAllocationSizes, 0, 4096, 13)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
......
......@@ -19575,6 +19575,9 @@ bool JSArrayBuffer::SetupAllocatingData(Handle<JSArrayBuffer> array_buffer,
if (allocated_length >= MB)
isolate->counters()->array_buffer_big_allocations()->AddSample(
ConvertToMb(allocated_length));
if (shared == SharedFlag::kShared)
isolate->counters()->shared_array_allocations()->AddSample(
ConvertToMb(allocated_length));
if (initialize) {
data = isolate->array_buffer_allocator()->Allocate(allocated_length);
} else {
......
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