Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

Calling Dart_TimelineEvent has a performance cost, and the APIs for collecting
timeline events are not available in release mode.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure Fuchsia isn't using this?

/cc @nathanrogersgoogle

@nathanrogersgoogle
Copy link
Contributor

Yes, Fuchsia benchmarks depend on having these events enabled even on release builds.

On Fuchsia, we try to configure tracing such that it's very cheap if tracing is not currently in progress, and still cheap if tracing is in progress but the category for a particular event was disabled.

Since this change will result in immediate build issues for Fuchsia, I ask that it not be submitted right now (at least for the Fuchsia platform). If it's shown to be causing performance issues on Fuchsia, then we can have a followup discussion to investigate further, and decide how to proceed from there.

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the signatures in sync between the release and non-release variants might get complicated. It's still ugly, but, can we just guard each call to Dart_TimelineEvent in this file using this macro?

Also, maybe make the macro TIMELINE_ENABLED or something similar so we can set if on in all modes for Fuchsia.

@jason-simmons
Copy link
Member Author

Changed this to disable the timeline in release mode only on non-Fuchsia targets

@chinmaygarde The goal of duplicating the signatures in TIMELINE_ENABLED and non-TIMELINE_ENABLED is to prevent accidentally adding a new timeline function and forgetting to #ifdef out the Dart_TimelineEvent call within that function.

Calling Dart_TimelineEvent has a performance cost, and the APIs for collecting
timeline events are not available in release mode.
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal of duplicating the signatures in TIMELINE_ENABLED and non-TIMELINE_ENABLED is to prevent accidentally adding a new timeline function and forgetting to #ifdef out the Dart_TimelineEvent call within that function.

I was more concerned about adding new methods in one path but finding that the build fails on the other (usually found via a failure on a bot somewhere). But, either way, don't feel too strongly about it.

@jason-simmons jason-simmons merged commit 51919ed into flutter:master Jan 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 24, 2020
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Jan 24, 2020
flutter/engine@439a218...f10f03a

git log 439a218..f10f03a --first-parent --oneline
2020-01-24 [email protected] Fix data race in DartIsolateGroupData. (flutter/engine#15949)
2020-01-23 [email protected] [fuchsia] Add LogSink to flutter_[jit & aot]_product_runner (flutter/engine#15697)
2020-01-23 [email protected] Do not produce timeline events in release mode (flutter/engine#15894)
2020-01-23 [email protected] Roll src/third_party/dart e84bea25df23..3eaae5405d37 (17 commits) (flutter/engine#15946)
2020-01-23 [email protected] Roll src/third_party/skia e4ddb8a7cddc..c88a3bc3f561 (24 commits) (flutter/engine#15945)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
NoamDev pushed a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
Calling Dart_TimelineEvent has a performance cost, and the APIs for collecting
timeline events are not available in release mode.
NoamDev added a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants