Reland: Add more trace events to "benchmark" category

This CL was reverted at
https://codereview.chromium.org/867773002/
due to perf bot redness at that time. Now that the perf bot has
recovered, we can reland it.

This is to make the trace events captured during smoothness test more
useful in debugging smoothness/latency issues.

These added trace events are supposed to be giving most useful information
about the input/scheduling/rendering pipeline and have low occurrence in
each frame so as to minimize the performance overhead.

Following are the list for the added trace events roughly in the order
of the input->rendering pipeline:

LatencyInfo.Flow                                 // so we can follow the input latency flow
RenderWidgetHostViewAndroid::OnVSync             // when frame is started
InputHandlerProxy::HandleInputEvent              // when the input event is handled on impl
RenderWidget::OnHandleInputEvent                 // when the input event is handled on main
Scheduler::BeginFrame                            // cc decides to schedule a frame
Scheduler::BeginRetroFrame                       // cc starts a retro frame
Scheduler::BeginImplFrame                        // impl frame is scheduled
Scheduler::OnBeginImplFrameDeadline              // impl frame actually starts
OnSwapCompositorFrame                            // browser gets notified that renderer frame is ready
CompositorImpl::PostComposit                     // browser schedules a frame
SingleThreadProxy::CompositeImmediately          // browser starts a frame
SingleThreadProxy::DidSwapBuffersCompleteOnImplThread  // browser frame is done

BUG=449258
TBR=sievers@chromium.org,brianderson@chromium.org,skyostil@chromium.org

Review URL: https://codereview.chromium.org/874283004

Cr-Commit-Position: refs/heads/master@{#313107}
10 files changed