-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add profiling counts to pipeline uses #179374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 7 commits into
flutter:master
from
walley892:profile-pipeline-counts
Dec 13, 2025
+201
−5
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
73db6a8
Add logging to pipeline uses
walley892 0212dbe
bot comments
walley892 96e83c6
first round of human comments
walley892 c6f1628
Merge remote-tracking branch 'upstream/master' into profile-pipeline-…
walley892 f83b5c1
Merge remote-tracking branch 'upstream/master' into profile-pipeline-…
walley892 2dd0e26
Only define the pipeline counts map in release and debug builds
walley892 dbe407d
Merge remote-tracking branch 'upstream/master' into profile-pipeline-…
walley892 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
engine/src/flutter/impeller/renderer/pipeline_library_unittests.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| #include "impeller/renderer/testing/mocks.h" | ||
|
|
||
| namespace impeller { | ||
| namespace testing { | ||
|
|
||
| TEST(MockPipelineLibrary, LogAndGetPipelineUsageSinglePipeline) { | ||
| MockPipelineLibrary pipeline_library; | ||
|
|
||
| PipelineDescriptor pipeline_desc; | ||
| pipeline_desc.SetLabel("pipeline"); | ||
|
|
||
| pipeline_library.LogPipelineUsage(pipeline_desc); | ||
| pipeline_library.LogPipelineUsage(pipeline_desc); | ||
|
|
||
| auto usage_counts = pipeline_library.GetPipelineUseCounts(); | ||
| #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \ | ||
| FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE | ||
| EXPECT_EQ(usage_counts[pipeline_desc], 2); | ||
| #else | ||
| EXPECT_EQ(usage_counts[pipeline_desc], 0); | ||
| #endif | ||
| } | ||
|
|
||
| TEST(MockPipelineLibrary, LogAndGetPipelineUsageMultiplePipelines) { | ||
| MockPipelineLibrary pipeline_library; | ||
|
|
||
| PipelineDescriptor pipeline_a; | ||
| pipeline_a.SetLabel("pipeline_a"); | ||
|
|
||
| PipelineDescriptor pipeline_b; | ||
| pipeline_b.SetLabel("pipeline_b"); | ||
|
|
||
| pipeline_library.LogPipelineUsage(pipeline_a); | ||
| pipeline_library.LogPipelineUsage(pipeline_a); | ||
| pipeline_library.LogPipelineUsage(pipeline_b); | ||
|
|
||
| auto usage_counts = pipeline_library.GetPipelineUseCounts(); | ||
|
|
||
| #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \ | ||
| FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE | ||
| EXPECT_EQ(usage_counts[pipeline_a], 2); | ||
| EXPECT_EQ(usage_counts[pipeline_b], 1); | ||
| #else | ||
| EXPECT_EQ(usage_counts[pipeline_a], 0); | ||
| EXPECT_EQ(usage_counts[pipeline_b], 0); | ||
| #endif | ||
| } | ||
|
|
||
| } // namespace testing | ||
| } // namespace impeller |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.