From c029c54170f14d1fc1d3c3aa27eaa0868e116516 Mon Sep 17 00:00:00 2001 From: Nathan Rogers Date: Wed, 3 Oct 2018 14:42:21 -0700 Subject: [PATCH] Add deadline_now_delta argument to Engine::NotifyIdle's trace This allows us to figure out from looking at a trace if an |Engine::NotifyIdle| call went beyond its deadline --- shell/common/engine.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/common/engine.cc b/shell/common/engine.cc index 2a9ee3f2c09b0..d12e24d6a835d 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -5,6 +5,7 @@ #include "flutter/shell/common/engine.h" #include +#include #include #include "flutter/common/settings.h" @@ -19,6 +20,7 @@ #include "flutter/shell/common/animator.h" #include "flutter/shell/common/platform_view.h" #include "flutter/shell/common/shell.h" +#include "third_party/dart/runtime/include/dart_tools_api.h" #include "third_party/rapidjson/rapidjson/document.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" @@ -194,7 +196,8 @@ void Engine::BeginFrame(fml::TimePoint frame_time) { } void Engine::NotifyIdle(int64_t deadline) { - TRACE_EVENT0("flutter", "Engine::NotifyIdle"); + TRACE_EVENT1("flutter", "Engine::NotifyIdle", "deadline_now_delta", + std::to_string(deadline - Dart_TimelineGetMicros()).c_str()); runtime_controller_->NotifyIdle(deadline); }