Commit 85d6d3b9 authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

gpu: Reduce notifyCacheMiss dump without crash rates

These have been spiking a bit, and so to cut down on the noise, reduce
the rate at which we emit these to 1% of the previous total.

The UMA stats will still show the true numbers, and this should still
allow us to get urls to try to reproduce these cases that are failing in
the wild.

Bug: 879110
Change-Id: Ice743cfa10f460deaf806cd1b28d534f446ce975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612225Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659746}
parent 0987fcfb
......@@ -6,6 +6,7 @@
#include "base/debug/dump_without_crashing.h"
#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "gpu/command_buffer/common/buffer.h"
#include "gpu/command_buffer/common/discardable_handle.h"
......@@ -102,8 +103,9 @@ class ServiceFontManager::SkiaDiscardableManager
const bool no_fallback = (type == SkStrikeClient::kGlyphMetrics ||
type == SkStrikeClient::kGlyphPath ||
type == SkStrikeClient::kGlyphImage);
constexpr int kMaxDumps = 10;
if (no_fallback && dump_count_ < kMaxDumps) {
constexpr int kMaxDumps = 5;
if (no_fallback && dump_count_ < kMaxDumps && base::RandInt(1, 100) == 1) {
++dump_count_;
base::debug::DumpWithoutCrashing();
}
......
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