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

Conversation

@iskakaushik
Copy link
Contributor

Chrome Trace viewer treats events labeled "VSYNC" as special and highlights them (when the "Highlight Vsync" checkbox is enabled). We do this for ios and android already, this PR also does this for fallback vsync waiters which are used by embedders by default.

Chrome Trace viewer treats events labeled "VSYNC" as special and highlights them (when the "Highlight Vsync" checkbox is enabled). Ideally VSYNC events are generated by the host system at their source. System VSYNC events are indeed present in full-system systraces. Flutter-level traces (as seen in Observatory/Flutter devtools) do not contain the system VSYNC events, so we rely on the engine to generate them (as close to where they would be generated by the system ideally).
@iskakaushik iskakaushik added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Mar 25, 2021
@chinmaygarde chinmaygarde self-requested a review March 25, 2021 20:51
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.

I also suggest (in another patch is fine) adding this trace around embedder provided vsync callback trampolines. That way, all existing embedders that wire up vsync correctly instead of falling back to a timer will get this well.

The only argument I can think of against doing this for embedder is if they want to do it themselves via FlutterEngineTraceEventInstant().


// |VsyncWaiter|
void VsyncWaiterFallback::AwaitVSync() {
TRACE_EVENT0("flutter", "VSYNC");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a TRACE_INSTANT0. It is not meant to be a slice I don't think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iskakaushik iskakaushik removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Mar 25, 2021
@iskakaushik iskakaushik merged commit 8594a91 into flutter:master Mar 25, 2021
@iskakaushik iskakaushik deleted the embedder-highlight-vsync-support branch March 25, 2021 21:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 25, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 26, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 26, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 29, 2021
chandarrengoog pushed a commit to chandarrengoog/engine that referenced this pull request Mar 30, 2021
Chrome Trace viewer treats events labeled "VSYNC" as special and highlights them (when the "Highlight Vsync" checkbox is enabled). Ideally VSYNC events are generated by the host system at their source. System VSYNC events are indeed present in full-system systraces. Flutter-level traces (as seen in Observatory/Flutter devtools) do not contain the system VSYNC events, so we rely on the engine to generate them (as close to where they would be generated by the system ideally).
duanqz pushed a commit to duanqz/engine that referenced this pull request Apr 16, 2021
Chrome Trace viewer treats events labeled "VSYNC" as special and highlights them (when the "Highlight Vsync" checkbox is enabled). Ideally VSYNC events are generated by the host system at their source. System VSYNC events are indeed present in full-system systraces. Flutter-level traces (as seen in Observatory/Flutter devtools) do not contain the system VSYNC events, so we rely on the engine to generate them (as close to where they would be generated by the system ideally).
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.

4 participants