Skip to content

Commit

Permalink
Add deadline_now_delta argument to Engine::NotifyIdle's trace (flutte…
Browse files Browse the repository at this point in the history
…r#6419)

This allows us to figure out from looking at a trace if an
|Engine::NotifyIdle| call went beyond its deadline
  • Loading branch information
nathanrogersgoogle committed Oct 4, 2018
1 parent 4af077b commit 37fd43d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shell/common/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "flutter/shell/common/engine.h"

#include <memory>
#include <string>
#include <utility>

#include "flutter/common/settings.h"
Expand All @@ -20,6 +21,7 @@
#include "flutter/shell/common/platform_view.h"
#include "flutter/shell/common/shell.h"
#include "rapidjson/document.h"
#include "third_party/dart/runtime/include/dart_tools_api.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 37fd43d

Please sign in to comment.