Commit 6bd09239 authored by Steve Kobes's avatar Steve Kobes Committed by Commit Bot

Remove TRACE_JANK_REGIONS.

This was a premature optimization.  We don't need to guard it, because
the TRACE_EVENT_* macros are smart enough to avoid evaluating their args
if we're not actually tracing.

It will be good if we can use canary builds to capture traces with jank
regions.

Bug: 581518
Change-Id: I320eff45154c2d156c9c64e9877e40358b779d9d
Reviewed-on: https://chromium-review.googlesource.com/1224463Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591400}
parent fa635a8f
...@@ -62,7 +62,6 @@ static const TransformPaintPropertyNode* TransformNodeFor( ...@@ -62,7 +62,6 @@ static const TransformPaintPropertyNode* TransformNodeFor(
return object.FirstFragment().LocalBorderBoxProperties().Transform(); return object.FirstFragment().LocalBorderBoxProperties().Transform();
} }
#ifdef TRACE_JANK_REGIONS
static void RegionToTracedValue(const Region& region, static void RegionToTracedValue(const Region& region,
double granularity_scale, double granularity_scale,
TracedValue& value) { TracedValue& value) {
...@@ -77,7 +76,6 @@ static void RegionToTracedValue(const Region& region, ...@@ -77,7 +76,6 @@ static void RegionToTracedValue(const Region& region,
} }
value.EndArray(); value.EndArray();
} }
#endif // TRACE_JANK_REGIONS
JankTracker::JankTracker(LocalFrameView* frame_view) JankTracker::JankTracker(LocalFrameView* frame_view)
: frame_view_(frame_view), : frame_view_(frame_view),
...@@ -223,14 +221,7 @@ std::unique_ptr<TracedValue> JankTracker::PerFrameTraceData( ...@@ -223,14 +221,7 @@ std::unique_ptr<TracedValue> JankTracker::PerFrameTraceData(
value->SetDouble("jank_fraction", jank_fraction); value->SetDouble("jank_fraction", jank_fraction);
value->SetDouble("cumulative_score", score_); value->SetDouble("cumulative_score", score_);
value->SetDouble("max_distance", max_distance_); value->SetDouble("max_distance", max_distance_);
#ifdef TRACE_JANK_REGIONS
// Jank regions can be included in trace event by defining TRACE_JANK_REGIONS
// at the top of this file. This is useful for debugging and visualizing, but
// might impact performance negatively.
RegionToTracedValue(region_, granularity_scale, *value); RegionToTracedValue(region_, granularity_scale, *value);
#endif
value->SetBoolean("is_main_frame", frame_view_->GetFrame().IsMainFrame()); value->SetBoolean("is_main_frame", frame_view_->GetFrame().IsMainFrame());
return value; return value;
} }
......
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