Add HistogramCustomExactLinear
For the Precompile and Pipeline Cache UMA metrics Skia needs linear count histograms with custom parameters. Low-Coverage-Reason: EXPERIMENTAL_CODE - Precompilation is not yet enabled in Chromium Bug: crbug.com/358074434 Change-Id: I08d25089a70957585e232a21e28fa17eb71c3020 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6420445 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Feels: Robert Phillips <robertphillips@google.com> Cr-Commit-Position: refs/heads/main@{#1441105}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d5806d77ec
commit
e127d3635a
@ -44,6 +44,20 @@ void HistogramExactLinear(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
base::HistogramBase::kUmaTargetedHistogramFlag));
|
||||
}
|
||||
|
||||
// Wrapper around HISTOGRAM_POINTER_USE - mimics UMA_HISTOGRAM_EXACT_LINEAR but
|
||||
// allows for an external atomic_histogram_pointer.
|
||||
void HistogramCustomExactLinear(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
const char* name,
|
||||
int sample,
|
||||
int value_min,
|
||||
int value_max,
|
||||
size_t bucket_count) {
|
||||
HISTOGRAM_POINTER_USE(atomic_histogram_pointer, name, Add(sample),
|
||||
base::LinearHistogram::FactoryGet(
|
||||
name, value_min, value_max, bucket_count,
|
||||
base::HistogramBase::kUmaTargetedHistogramFlag));
|
||||
}
|
||||
|
||||
// Wrapper around HISTOGRAM_POINTER_USE - mimics UMA_HISTOGRAM_MEMORY_KB but
|
||||
// allows for an external atomic_histogram_pointer.
|
||||
void HistogramMemoryKB(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
|
@ -33,6 +33,11 @@
|
||||
SK_HISTOGRAM_POINTER_HELPER(skia::HistogramExactLinear, "Skia." name, \
|
||||
sample, value_max)
|
||||
|
||||
#define SK_HISTOGRAM_CUSTOM_EXACT_LINEAR(name, sample, value_min, value_max, \
|
||||
bucket_count) \
|
||||
SK_HISTOGRAM_POINTER_HELPER(skia::HistogramCustomExactLinear, "Skia." name, \
|
||||
sample, value_min, value_max, bucket_count)
|
||||
|
||||
#define SK_HISTOGRAM_MEMORY_KB(name, sample) \
|
||||
SK_HISTOGRAM_POINTER_HELPER(skia::HistogramMemoryKB, "Skia." name, sample)
|
||||
|
||||
@ -60,6 +65,12 @@ void HistogramExactLinear(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
const char* name,
|
||||
int sample,
|
||||
int value_max);
|
||||
void HistogramCustomExactLinear(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
const char* name,
|
||||
int sample,
|
||||
int value_min,
|
||||
int value_max,
|
||||
size_t bucket_count);
|
||||
void HistogramMemoryKB(std::atomic_uintptr_t* atomic_histogram_pointer,
|
||||
const char* name,
|
||||
int sample);
|
||||
|
Reference in New Issue
Block a user