Commit a3cce20d authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

[blink] Remove Event.HitTest metric.

This metric has expired.

Fixed: 1072662
Change-Id: Iad422fcd3ba65a8e43da385961aaac406c5e2d4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2524921Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825490}
parent 60e3a6a3
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "third_party/blink/renderer/core/layout/hit_test_cache.h" #include "third_party/blink/renderer/core/layout/hit_test_cache.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
namespace blink { namespace blink {
...@@ -13,9 +12,7 @@ bool HitTestCache::LookupCachedResult(const HitTestLocation& location, ...@@ -13,9 +12,7 @@ bool HitTestCache::LookupCachedResult(const HitTestLocation& location,
HitTestResult& hit_result, HitTestResult& hit_result,
uint64_t dom_tree_version) { uint64_t dom_tree_version) {
bool result = false; bool result = false;
HitHistogramMetric metric = HitHistogramMetric::MISS;
if (hit_result.GetHitTestRequest().AvoidCache()) { if (hit_result.GetHitTestRequest().AvoidCache()) {
metric = HitHistogramMetric::MISS_EXPLICIT_AVOID;
// For now we don't support rect based hit results. // For now we don't support rect based hit results.
} else if (dom_tree_version == dom_tree_version_ && } else if (dom_tree_version == dom_tree_version_ &&
!location.IsRectBasedTest()) { !location.IsRectBasedTest()) {
...@@ -23,20 +20,13 @@ bool HitTestCache::LookupCachedResult(const HitTestLocation& location, ...@@ -23,20 +20,13 @@ bool HitTestCache::LookupCachedResult(const HitTestLocation& location,
if (cached_item.location.Point() == location.Point()) { if (cached_item.location.Point() == location.Point()) {
if (hit_result.GetHitTestRequest().EqualForCacheability( if (hit_result.GetHitTestRequest().EqualForCacheability(
cached_item.result.GetHitTestRequest())) { cached_item.result.GetHitTestRequest())) {
metric = HitHistogramMetric::HIT_EXACT_MATCH;
result = true; result = true;
hit_result = cached_item.result; hit_result = cached_item.result;
break; break;
} }
metric = HitHistogramMetric::MISS_VALIDITY_RECT_MATCHES;
} }
} }
} }
DEFINE_STATIC_LOCAL(
EnumerationHistogram, hit_test_histogram,
("Event.HitTest",
static_cast<int32_t>(HitHistogramMetric::MAX_HIT_METRIC)));
hit_test_histogram.Count(static_cast<int32_t>(metric));
return result; return result;
} }
......
...@@ -65,22 +65,6 @@ class CORE_EXPORT HitTestCache final : public GarbageCollected<HitTestCache> { ...@@ -65,22 +65,6 @@ class CORE_EXPORT HitTestCache final : public GarbageCollected<HitTestCache> {
void Trace(Visitor*) const; void Trace(Visitor*) const;
private: private:
// The below UMA values reference a validity region. This code has not
// been written yet; and exact matches are only supported but the
// UMA enumerations have been added for future support.
// These values are reported in UMA as the "EventHitTest" enumeration.
// Do not reorder, append new values at the end, deprecate old
// values and update histograms.xml.
enum class HitHistogramMetric {
MISS, // Miss, not found in cache.
MISS_EXPLICIT_AVOID, // Miss, callee asked to explicitly avoid cache.
MISS_VALIDITY_RECT_MATCHES, // Miss, validity region matches, type doesn't.
HIT_EXACT_MATCH, // Hit, exact point matches.
HIT_REGION_MATCH, // Hit, validity region matches.
MAX_HIT_METRIC = HIT_REGION_MATCH,
};
unsigned update_index_; unsigned update_index_;
HeapVector<HitTestCacheEntry, HIT_TEST_CACHE_SIZE> items_; HeapVector<HitTestCacheEntry, HIT_TEST_CACHE_SIZE> items_;
......
...@@ -182,6 +182,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -182,6 +182,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</histogram> </histogram>
<histogram name="Event.HitTest" enum="EventHitTest" expires_after="2020-05-31"> <histogram name="Event.HitTest" enum="EventHitTest" expires_after="2020-05-31">
<obsolete>
Removed in M88.
</obsolete>
<owner>dtapuska@chromium.org</owner> <owner>dtapuska@chromium.org</owner>
<summary> <summary>
For each hit test, records whether it was a hit or miss, and why. For each hit test, records whether it was a hit or miss, and why.
......
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