Commit 0b919c6d authored by Mohsen Izadi's avatar Mohsen Izadi Committed by Commit Bot

Add Viz breakdown to EventLatency trace events

Please see a screenshot from a sample trace at:
https://drive.google.com/file/d/1rTdrSmfPoM07ycf76cpLAC1zHZrfwus0/view

Bug: 1054009
Change-Id: Ia24056e6a9951dae4e4be00f1e58aa6c93ff2706
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166637Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Mohsen Izadi <mohsen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770946}
parent 090f4e37
This diff is collapsed.
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <bitset> #include <bitset>
#include <memory> #include <memory>
#include <utility>
#include <vector> #include <vector>
#include "base/optional.h" #include "base/optional.h"
...@@ -213,15 +214,9 @@ class CC_EXPORT CompositorFrameReporter { ...@@ -213,15 +214,9 @@ class CC_EXPORT CompositorFrameReporter {
int stage_type_index, int stage_type_index,
base::TimeDelta latency) const; base::TimeDelta latency) const;
// Generate a trace event corresponding to a Viz breakdown under void ReportCompositorLatencyTraceEvents(
// SubmitCompositorFrameToPresentationCompositorFrame stage in const char* termination_status_str) const;
// PipelineReporter. This function only generates trace events and does not void ReportEventLatencyTraceEvents() const;
// report histograms.
void ReportVizBreakdownTrace(VizBreakdown substage,
const base::TimeTicks start_time,
const base::TimeTicks end_time) const;
void ReportAllTraceEvents(const char* termination_status_str) const;
void EnableReportType(FrameReportType report_type) { void EnableReportType(FrameReportType report_type) {
report_types_.set(static_cast<size_t>(report_type)); report_types_.set(static_cast<size_t>(report_type));
...@@ -249,7 +244,7 @@ class CC_EXPORT CompositorFrameReporter { ...@@ -249,7 +244,7 @@ class CC_EXPORT CompositorFrameReporter {
viz::FrameTimingDetails viz_breakdown_; viz::FrameTimingDetails viz_breakdown_;
base::TimeTicks viz_start_time_; base::TimeTicks viz_start_time_;
base::Optional<base::TimeDelta> base::Optional<std::pair<base::TimeTicks, base::TimeTicks>>
viz_breakdown_list_[static_cast<int>(VizBreakdown::kBreakdownCount)]; viz_breakdown_list_[static_cast<int>(VizBreakdown::kBreakdownCount)];
// Stage data is recorded here. On destruction these stages will be reported // Stage data is recorded here. On destruction these stages will be reported
......
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