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

[Impeller] Report pipeline creation feedback to logs and traces. #43227

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

chinmaygarde
Copy link
Member

Piping the feedback to logs is disabled by default but can be enabled by patching the source for now. If reading from logs gets to be useful, we can move it behind a flag. In traces, enabled by default, pipeline cache hits and misses will be shown via counters. The time taken to create a pipeline variant is already covered by existing traces.

This patch also sets up infrastructure in the impeller::CapabilitiesVK to quickly enable optional device extensions.

Pipeline feedback will only be reported if the device supports VK_EXT_pipeline_creation_feedback.

Example of logs:

E/flutter ( 2011): >>>>>>
E/flutter ( 2011): Pipeline 'GaussianBlurAlphaDecal Pipeline' Time: 48.60ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 1: Time: 12.91ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 2: Time: 15.10ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011): <<<<<<

Piping the feedback to logs is disabled by default but can be enabled by
patching the source for now. If reading from logs gets to be useful, we can move
it behind a flag. In traces, enabled by default, pipeline cache hits and misses
will be shown via counters. The time taken to create a pipeline variant is
already covered by existing traces.

This patch also sets up infrastructure in the impeller::CapabilitiesVK to
quickly enable optional device extensions.

Pipeline feedback will only be reported if the device supports
`VK_EXT_pipeline_creation_feedback`.

Example of logs:

```
E/flutter ( 2011): >>>>>>
E/flutter ( 2011): Pipeline 'GaussianBlurAlphaDecal Pipeline' Time: 48.60ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 1: Time: 12.91ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 2: Time: 15.10ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011): <<<<<<
```
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

What is the switch I'd need to flip to see the feedback locally?

@chinmaygarde
Copy link
Member Author

chinmaygarde commented Jun 27, 2023

Set kReportPipelineCreationFeedbackToLogs to true.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

ahh I missed that, makes sense

LGTM

@chinmaygarde chinmaygarde added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 27, 2023
@auto-submit auto-submit bot merged commit f5ac545 into flutter:main Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 27, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 27, 2023
…129678)

flutter/engine@f320b8c...7c7c45d

2023-06-27 [email protected] Update skia includes to be more specific (flutter/engine#43284)
2023-06-27 [email protected] [web:a11y] introduce primary role responsible for ARIA roles (flutter/engine#43159)
2023-06-27 [email protected] Roll Fuchsia Mac SDK from ytzCCSvHY1lHWEDM9... to sBFKkha8HNLZpTNwv... (flutter/engine#43277)
2023-06-27 [email protected] Roll ANGLE from 9faf7059f9ef to 113f847be69f (2 revisions) (flutter/engine#43278)
2023-06-27 [email protected] Initialize skwasm codecs before handing them back to the user. (flutter/engine#43274)
2023-06-27 [email protected] Roll ANGLE from 02292814a9d3 to 9faf7059f9ef (7 revisions) (flutter/engine#43272)
2023-06-27 [email protected] Update Xcode to 14.3.1 (flutter/engine#42930)
2023-06-27 [email protected] [Impeller] Add Vulkan allocator traces. (flutter/engine#43215)
2023-06-27 [email protected] Roll Fuchsia Linux SDK from bj_X2Se1zObk_l_CC... to Bvv7TyHm_VHUkndFx... (flutter/engine#43270)
2023-06-27 [email protected] [Impeller] Report pipeline creation feedback to logs and traces. (flutter/engine#43227)
2023-06-27 [email protected] [Impeller] Give Impeller a dedicated raster priority level worker loop. (flutter/engine#43166)
2023-06-27 [email protected] [Impeller] Fixes for GLES color mask setup (flutter/engine#43225)
2023-06-27 [email protected] Roll ANGLE from cba77bceb26c to 02292814a9d3 (1 revision) (flutter/engine#43224)
2023-06-27 [email protected] Roll Skia from 370132bcadb1 to 5209dc7702d0 (1 revision) (flutter/engine#43223)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from bj_X2Se1zObk to Bvv7TyHm_VHU
  fuchsia/sdk/core/mac-amd64 from ytzCCSvHY1lH to sBFKkha8HNLZ

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],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

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/+doc/main/autoroll/README.md
kjlubick pushed a commit to kjlubick/engine that referenced this pull request Jul 14, 2023
…tter#43227)

Piping the feedback to logs is disabled by default but can be enabled by patching the source for now. If reading from logs gets to be useful, we can move it behind a flag. In traces, enabled by default, pipeline cache hits and misses will be shown via counters. The time taken to create a pipeline variant is already covered by existing traces.

This patch also sets up infrastructure in the impeller::CapabilitiesVK to quickly enable optional device extensions.

Pipeline feedback will only be reported if the device supports `VK_EXT_pipeline_creation_feedback`.

Example of logs:

```
E/flutter ( 2011): >>>>>>
E/flutter ( 2011): Pipeline 'GaussianBlurAlphaDecal Pipeline' Time: 48.60ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 1: Time: 12.91ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011):  Stage 2: Time: 15.10ms Cache Hit: 0 Base Accel: 0 Thread: 481449901232
E/flutter ( 2011): <<<<<<
```
@chinmaygarde chinmaygarde deleted the pipelinefeedback branch August 22, 2024 19:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller needs tests
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants