mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[tracing] Add trace events for DartIsolate::HandleMessage (flutter/engine#25241)
This captures majority of the non frame related workload happening on the UI thread.
This commit is contained in:
parent
9f88f31f86
commit
6301223cee
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user