gpui: Unify performance tracking under the profiler feature - #62496
Merged
Conversation
anantdgoel
approved these changes
Aug 11, 2026
Anthony-Eid
force-pushed
the
anthony-eid/frame-profiler-unification-7f4c
branch
from
August 12, 2026 17:49
a8bc784 to
4100670
Compare
Anthony-Eid
force-pushed
the
anthony-eid/frame-profiler-unification-7f4c
branch
from
August 12, 2026 18:16
4100670 to
82fd318
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
…filer-unification-7f4c # Conflicts: # crates/gpui/src/app/bench_context.rs
Anthony-Eid
enabled auto-merge
August 14, 2026 16:30
playdohface
pushed a commit
to playdohface/zed
that referenced
this pull request
Aug 29, 2026
…stries#62496) GPUI currently splits performance instrumentation across several Cargo features and runtime controls. Task profiling, frame-duration histograms, input-latency histograms, and benchmark frame timing therefore follow separate code paths despite measuring related parts of the same UI work. This PR consolidates those systems under the `profiler` Cargo feature. The `bench` feature now enables `profiler`, aggregate frame and input-latency histograms remain active whenever profiling is compiled in, and `set_trace_enabled` controls whether individual task timings and per-frame draw and presentation records are retained. The change also introduces a single per-window profiler that owns the begin and end state for input dispatch, drawing, and presentation, and routes window action-handler timing through the existing aggregate action tracker. Draw and presentation records reuse the same timestamps and computed intervals as the aggregate histograms, avoiding duplicate clock reads. Benchmark trace scopes are reference-counted so overlapping measurements cannot disable tracing while another measurement still needs it. This does not change hang detection directly. It establishes the common profiling foundation needed to correlate slow or delayed frames with actions and foreground or background tasks. Better attribution should make it easier to find and prevent responsiveness regressions. Release Notes: - N/A --------- Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
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.
GPUI currently splits performance instrumentation across several Cargo features and runtime controls. Task profiling, frame-duration histograms, input-latency histograms, and benchmark frame timing therefore follow separate code paths despite measuring related parts of the same UI work.
This PR consolidates those systems under the
profilerCargo feature. Thebenchfeature now enablesprofiler, aggregate frame and input-latency histograms remain active whenever profiling is compiled in, andset_trace_enabledcontrols whether individual task timings and per-frame draw and presentation records are retained.The change also introduces a single per-window profiler that owns the begin and end state for input dispatch, drawing, and presentation, and routes window action-handler timing through the existing aggregate action tracker. Draw and presentation records reuse the same timestamps and computed intervals as the aggregate histograms, avoiding duplicate clock reads. Benchmark trace scopes are reference-counted so overlapping measurements cannot disable tracing while another measurement still needs it.
This does not change hang detection directly. It establishes the common profiling foundation needed to correlate slow or delayed frames with actions and foreground or background tasks. Better attribution should make it easier to find and prevent responsiveness regressions.
Release Notes: