Commit 02ec4e24 authored by kylechar's avatar kylechar Committed by Commit Bot

Remove ShouldSendBeginFrame UMA

Compositing.CompositorFrameSinkSupport.ShouldSendBeginFrame has expired
so remove the histogram.

Fixed: 1121212
Change-Id: Ia0145d49c5fe98707d516ade461f72dafb8ce38a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485783
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819984}
parent 01506a41
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "components/viz/service/frame_sinks/compositor_frame_sink_support.h" #include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
#include <algorithm> #include <algorithm>
#include <string>
#include <utility> #include <utility>
#include "base/bind.h" #include "base/bind.h"
...@@ -26,26 +27,8 @@ ...@@ -26,26 +27,8 @@
namespace viz { namespace viz {
namespace { namespace {
// These values are logged to UMA. Entries should not be renumbered and numeric void RecordShouldSendBeginFrame(const std::string& reason) {
// values should never be reused. Please keep in sync with TRACE_EVENT1("viz", "ShouldNotSendBeginFrame", "reason", reason);
// "SendBeginFrameResult" in src/tools/metrics/histograms/enums.xml.
enum class SendBeginFrameResult {
kSendFrameTiming = 0,
kStopNotRequest = 1,
kStopUnresponsiveClient = 2,
kThrottleUnresponsiveClient = 3,
kSendNoActiveSurface = 4,
kSendBlockedEmbedded = 5,
kThrottleUndrawnFrames = 6,
kSendDefault = 7,
kThrottleAsRequested = 8,
kMaxValue = kThrottleAsRequested
};
void RecordShouldSendBeginFrame(SendBeginFrameResult result) {
TRACE_EVENT1("viz", "ShouldNotSendBeginFrame", "reason", result);
UMA_HISTOGRAM_ENUMERATION(
"Compositing.CompositorFrameSinkSupport.ShouldSendBeginFrame", result);
} }
void AdjustPresentationFeedback(gfx::PresentationFeedback* feedback, void AdjustPresentationFeedback(gfx::PresentationFeedback* feedback,
...@@ -853,43 +836,42 @@ bool CompositorFrameSinkSupport::ShouldSendBeginFrame( ...@@ -853,43 +836,42 @@ bool CompositorFrameSinkSupport::ShouldSendBeginFrame(
// If there are pending timing details from the previous frame(s), // If there are pending timing details from the previous frame(s),
// then the client needs to receive the begin-frame. // then the client needs to receive the begin-frame.
if (!frame_timing_details_.empty() && !should_throttle_as_requested) { if (!frame_timing_details_.empty() && !should_throttle_as_requested) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kSendFrameTiming); RecordShouldSendBeginFrame("SendFrameTiming");
return true; return true;
} }
if (!client_needs_begin_frame_) { if (!client_needs_begin_frame_) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kStopNotRequest); RecordShouldSendBeginFrame("StopNotRequested");
return false; return false;
} }
// Stop sending BeginFrames to clients that are totally unresponsive. // Stop sending BeginFrames to clients that are totally unresponsive.
if (begin_frame_tracker_.ShouldStopBeginFrame()) { if (begin_frame_tracker_.ShouldStopBeginFrame()) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kStopUnresponsiveClient); RecordShouldSendBeginFrame("StopUnresponsiveClient");
return false; return false;
} }
// Throttle clients that are unresponsive. // Throttle clients that are unresponsive.
if (can_throttle_if_unresponsive_or_excessive && if (can_throttle_if_unresponsive_or_excessive &&
begin_frame_tracker_.ShouldThrottleBeginFrame()) { begin_frame_tracker_.ShouldThrottleBeginFrame()) {
RecordShouldSendBeginFrame( RecordShouldSendBeginFrame("ThrottleUnresponsiveClient");
SendBeginFrameResult::kThrottleUnresponsiveClient);
return false; return false;
} }
if (!last_activated_surface_id_.is_valid()) { if (!last_activated_surface_id_.is_valid()) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kSendNoActiveSurface); RecordShouldSendBeginFrame("SendNoActiveSurface");
return true; return true;
} }
// We should never throttle BeginFrames if there is another client waiting for // We should never throttle BeginFrames if there is another client waiting for
// this client to submit a frame. // this client to submit a frame.
if (surface_manager_->HasBlockedEmbedder(frame_sink_id_)) { if (surface_manager_->HasBlockedEmbedder(frame_sink_id_)) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kSendBlockedEmbedded); RecordShouldSendBeginFrame("SendBlockedEmbedded");
return true; return true;
} }
if (should_throttle_as_requested) { if (should_throttle_as_requested) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kThrottleAsRequested); RecordShouldSendBeginFrame("ThrottleRequested");
return false; return false;
} }
...@@ -910,12 +892,12 @@ bool CompositorFrameSinkSupport::ShouldSendBeginFrame( ...@@ -910,12 +892,12 @@ bool CompositorFrameSinkSupport::ShouldSendBeginFrame(
uint64_t num_undrawn_frames = active_frame_index - last_drawn_frame_index_; uint64_t num_undrawn_frames = active_frame_index - last_drawn_frame_index_;
if (can_throttle_if_unresponsive_or_excessive && if (can_throttle_if_unresponsive_or_excessive &&
num_undrawn_frames > kUndrawnFrameLimit) { num_undrawn_frames > kUndrawnFrameLimit) {
RecordShouldSendBeginFrame(SendBeginFrameResult::kThrottleUndrawnFrames); RecordShouldSendBeginFrame("ThrottleUndrawnFrames");
return false; return false;
} }
// No other conditions apply so send the begin frame. // No other conditions apply so send the begin frame.
RecordShouldSendBeginFrame(SendBeginFrameResult::kSendDefault); RecordShouldSendBeginFrame("SendDefault");
return true; return true;
} }
......
...@@ -65371,6 +65371,9 @@ https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf ...@@ -65371,6 +65371,9 @@ https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf
</enum> </enum>
<enum name="SendBeginFrameResult"> <enum name="SendBeginFrameResult">
<obsolete>
Expired Oct 2020
</obsolete>
<int value="0" label="Sent for frame timing"/> <int value="0" label="Sent for frame timing"/>
<int value="1" label="Stopped by client request"/> <int value="1" label="Stopped by client request"/>
<int value="2" label="Stopped for unresponsive client"/> <int value="2" label="Stopped for unresponsive client"/>
...@@ -113,6 +113,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -113,6 +113,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Compositing.CompositorFrameSinkSupport.ShouldSendBeginFrame" <histogram name="Compositing.CompositorFrameSinkSupport.ShouldSendBeginFrame"
enum="SendBeginFrameResult" expires_after="2020-10-04"> enum="SendBeginFrameResult" expires_after="2020-10-04">
<obsolete>
Expired Oct 2020
</obsolete>
<owner>kylechar@chromium.org</owner> <owner>kylechar@chromium.org</owner>
<owner>sadrul@chromium.org</owner> <owner>sadrul@chromium.org</owner>
<summary> <summary>
......
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