ci(audience): capture Unity 6 deep profiler dump on Linux#764
Closed
ImmutableJeffrey wants to merge 1 commit intochore/sdk-318-linux-playmode-xvfbfrom
Closed
ci(audience): capture Unity 6 deep profiler dump on Linux#764ImmutableJeffrey wants to merge 1 commit intochore/sdk-318-linux-playmode-xvfbfrom
ImmutableJeffrey wants to merge 1 commit intochore/sdk-318-linux-playmode-xvfbfrom
Conversation
This was referenced May 9, 2026
Collaborator
Author
|
Closing without merging. Profile capture served its purpose. Findings: Unity 6 Linux cells are bottlenecked on per-frame UI Toolkit cost on llvmpipe combined with frame-paced test polling (yield return null per check). Each WaitForLogEntry spin happens at the player's frame rate, which is 1-2 fps on llvmpipe. 39 tests x ~30 sec WaitForLogEntry budget = the 27 min cell time. Pursuing the targeted fix (time-based polling in test helpers) in a new PR. |
ImmutableJeffrey
added a commit
that referenced
this pull request
May 9, 2026
…runs Adds PlayerProfilerLogger gated on UNITY_STANDALONE_LINUX and the AUDIENCE_PLAYER_PROFILE_PATH env var. At BeforeSceneLoad inside the test player process, points UnityEngine.Profiling.Profiler at the configured path and starts a binary log of every captured frame. PR #764 captured a deep profile of the editor process. The actual test loop runs in a separate PlayerWithTests subprocess that the editor launches and waits on. The editor profile only showed roughly 86 sec of editor activity over a 27 min cell, the rest being editor idle waiting on the player. This hook plugs that gap. Wires the env var through the playmode-linux job's docker run and adds player-profile.raw to the upload-artifact path so the capture is downloadable for offline analysis in Unity Editor. Note: enables regular profiling, not deep. Deep profiling on the player would need -deepprofiling on the player command line, which Unity Test Framework does not expose for editor-launched test players. Regular profiling still surfaces per-frame CPU and the function hot list, which is what we need to identify what is eating roughly 37 sec per test.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
-profiler-enable -deepprofiling -profiler-log-fileto the Unity invocation inplaymode-linux, gated to Unity 6 cells only.profile.rawas an artifact alongside existing playmode artifacts.Why
Unity 6 Linux cells take roughly 7x longer than Unity 2021.3 on the same SampleApp and same software rasteriser. Cause unknown. The capture lets us see per-frame and per-call costs.
How to use the capture
Download
profile.raw, open Unity Editor on the same project, Window > Analysis > Profiler, "Load" the file. Inspect CPU usage by frame to find the cost centre.🤖 Generated with Claude Code