未验证 提交 c1e543ac 编写于 作者: K Kaushik Iska 提交者: GitHub

[tracing] Add trace events for DartIsolate::HandleMessage (#25241)

This captures majority of the non frame related workload
happening on the UI thread.
上级 8594a914
......@@ -445,8 +445,13 @@ void DartIsolate::SetMessageHandlingTaskRunner(
message_handling_task_runner_ = runner;
message_handler().Initialize(
[runner](std::function<void()> task) { runner->PostTask(task); });
message_handler().Initialize([runner](std::function<void()> task) {
TRACE_EVENT0("flutter", "DartIsolate::PostMessage");
runner->PostTask([task = std::move(task)]() {
TRACE_EVENT0("flutter", "DartIsolate::HandleMessage");
task();
});
});
}
// Updating thread names here does not change the underlying OS thread names.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册