Add more tracing to Sky

This CL adds trace events:

1) Between requesting a frame and begin frame.
2) In the DartLoader see network latency.
3) While executing |main| and |_init|.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1025073003
This commit is contained in:
Adam Barth 2015-03-20 16:11:39 -07:00
parent 38ce45bb07
commit 55f5a4c536

View File

@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/trace_event/trace_event.h"
namespace sky {
namespace shell {
@ -24,6 +25,8 @@ Animator::~Animator() {
void Animator::RequestFrame() {
if (engine_requested_frame_)
return;
TRACE_EVENT_ASYNC_BEGIN0("sky", "Frame request pending", this);
engine_requested_frame_ = true;
if (!frame_in_progress_) {
@ -45,7 +48,9 @@ void Animator::BeginFrame() {
frame_in_progress_ = false;
return;
}
engine_requested_frame_ = false;
TRACE_EVENT_ASYNC_END0("sky", "Frame request pending", this);
engine_->BeginFrame(base::TimeTicks::Now());
config_.gpu_task_runner->PostTaskAndReply(