Skip to content

Commit

Permalink
Revert "Add debug BeginFrame tracking"
Browse files Browse the repository at this point in the history
This reverts commit 61bb69a.

Reason for revert: Removing debug instrumentation before branch.

Original change's description:
> Add debug BeginFrame tracking
> 
> Add some temporary member variables to BeginFrameTracker that stores the
> total sent/received and the last 10 sent/received BeginFrameIds. Despite
> adding logic to stop sending OnBeginFrame() to unresponsive clients it
> didn't help with the large number of unread messages in mojo message
> queue. This information will do a better job of verifying if client is
> in fact reading (and responding to) the OnBeginFrame() messages.
> 
> The |begin_frame_tracker_| is included in a few minidumps I looked at
> it, so this information should be available in crash reports. Otherwise
> we'll have to copy the information into the stack in OnBeginFrame().
> 
> Bug: 1011441
> Change-Id: I44112d933fb4470fb037e7bfd2d9dc05dd826a94
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1994093
> Reviewed-by: Saman Sami <samans@chromium.org>
> Commit-Queue: kylechar <kylechar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#730310}

TBR=kylechar@chromium.org,samans@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1011441
Change-Id: I3c7d5572c19ede7d653d24175d7023e7a7e282c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2025768
Reviewed-by: kylechar <kylechar@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736090}
  • Loading branch information
kylechar authored and Commit Bot committed Jan 28, 2020
1 parent 46ebfa2 commit 5090bee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
10 changes: 0 additions & 10 deletions components/viz/service/frame_sinks/begin_frame_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@

namespace viz {

BeginFrameTracker::BeginFrameTracker() = default;

BeginFrameTracker::~BeginFrameTracker() = default;

void BeginFrameTracker::SentBeginFrame(const BeginFrameArgs& args) {
++total_begin_frames_sent_;
recent_begin_frames_sent_.SaveToBuffer(args.frame_id);

++outstanding_begin_frames_;
last_frame_id_ = args.frame_id;
}

void BeginFrameTracker::ReceivedAck(const BeginFrameAck& ack) {
++total_acks_received_;
recent_acks_received_.SaveToBuffer(ack.frame_id);

if (MatchesLastSent(ack)) {
// If the BeginFrameAck matches the last sent BeginFrameArgs then we know
// the client has read every message from the pipe. While the client
Expand Down
13 changes: 0 additions & 13 deletions components/viz/service/frame_sinks/begin_frame_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef COMPONENTS_VIZ_SERVICE_FRAME_SINKS_BEGIN_FRAME_TRACKER_H_
#define COMPONENTS_VIZ_SERVICE_FRAME_SINKS_BEGIN_FRAME_TRACKER_H_

#include "base/containers/ring_buffer.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/service/viz_service_export.h"

Expand All @@ -24,9 +23,6 @@ class VIZ_SERVICE_EXPORT BeginFrameTracker {
static constexpr int kLimitStop = 100;
static constexpr int kLimitThrottle = 10;

BeginFrameTracker();
~BeginFrameTracker();

// To be called every time OnBeginFrame() is sent.
void SentBeginFrame(const BeginFrameArgs& args);

Expand All @@ -42,15 +38,6 @@ class VIZ_SERVICE_EXPORT BeginFrameTracker {
int outstanding_begin_frames_ = 0;

BeginFrameId last_frame_id_;

// The following variables are keeping track of some information about sent
// and received BeginFrameIds. This information is just being tracked only so
// it's available in crash minidumps to help debug https://crbug.com/1011441.
// TODO(crbug.com/1011441): Remove this before it hits stable channel!
int total_begin_frames_sent_ = 0;
int total_acks_received_ = 0;
base::RingBuffer<BeginFrameId, 10> recent_begin_frames_sent_;
base::RingBuffer<BeginFrameId, 10> recent_acks_received_;
};

} // namespace viz
Expand Down

0 comments on commit 5090bee

Please sign in to comment.