Skip to content

Commit 37fd43d

Browse files
Add deadline_now_delta argument to Engine::NotifyIdle's trace (flutter#6419)
This allows us to figure out from looking at a trace if an |Engine::NotifyIdle| call went beyond its deadline
1 parent 4af077b commit 37fd43d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

shell/common/engine.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "flutter/shell/common/engine.h"
66

77
#include <memory>
8+
#include <string>
89
#include <utility>
910

1011
#include "flutter/common/settings.h"
@@ -20,6 +21,7 @@
2021
#include "flutter/shell/common/platform_view.h"
2122
#include "flutter/shell/common/shell.h"
2223
#include "rapidjson/document.h"
24+
#include "third_party/dart/runtime/include/dart_tools_api.h"
2325
#include "third_party/skia/include/core/SkCanvas.h"
2426
#include "third_party/skia/include/core/SkPictureRecorder.h"
2527

@@ -194,7 +196,8 @@ void Engine::BeginFrame(fml::TimePoint frame_time) {
194196
}
195197

196198
void Engine::NotifyIdle(int64_t deadline) {
197-
TRACE_EVENT0("flutter", "Engine::NotifyIdle");
199+
TRACE_EVENT1("flutter", "Engine::NotifyIdle", "deadline_now_delta",
200+
std::to_string(deadline - Dart_TimelineGetMicros()).c_str());
198201
runtime_controller_->NotifyIdle(deadline);
199202
}
200203

0 commit comments

Comments
 (0)