Skip to content

Conversation

@walley892
Copy link
Contributor

This PR adds functionality that logs uses of pipeline variants during render passes across all rendering backends for impeller. It also adds a method to the engine service protocol that emits these usage statistics. New functionality is unit tested.

Fixes #176660.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Dec 3, 2025
@walley892 walley892 force-pushed the profile-pipeline-counts branch from 3c82621 to 73db6a8 Compare December 3, 2025 01:28
@flutter flutter deleted a comment from flutter-dashboard bot Dec 3, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR adds profiling for pipeline variant usage in Impeller. It introduces a mechanism to track pipeline creation and usage, and exposes this data through a new service protocol extension. The changes span across the rendering backends (Metal, GLES, Vulkan) to log pipeline usage, and modify the shell to handle the new service protocol request.

My review focuses on correctness, thread safety, and code improvements. I've found a critical data race in PipelineLibrary due to unsynchronized access to the usage counts map from multiple threads. I've also identified a typo in the new service protocol extension name, and suggested some code simplifications and optimizations. Please see the detailed comments.

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.

Apologies for the late review! Some minor suggestions.

@walley892 walley892 added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 12, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 12, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Dec 12, 2025

autosubmit label was removed for flutter/flutter/179374, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@walley892 walley892 added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Dec 13, 2025
Merged via the queue into flutter:master with commit 3b4ada3 Dec 13, 2025
182 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Impeller] Allow profiling pipeline use counts.

2 participants