ui: fix ts/dur deep-link selection for GPU slices - #7022
Open
suo wants to merge 1 commit into
Open
Conversation
Deep links carrying ts/dur query params (dev.perfetto.DeeplinkQuerystring) zoom to the right viewport but silently fail to select the target slice on GPU traces. Two independent causes: 1. UnionDataset.query() groups datasets for merging by source table and join *alias* only (getJoinSignature). The UI tracks created for grouped/split trace-processor tracks (e.g. GPU hardware queues whose overlapping slices TrackCompressor splits into parallel tracks) each join their own experimental_slice_layout depth table under the shared 'depth' alias. The merge keeps only one of those join definitions, so the merged branch inner-joins every row through a single depth table and silently drops all rows that only exist in the other groups. resolveSqlEvents() then finds no track for the slice and the selection is dropped without feedback. Any trace with two or more split tracks is affected. Fix: include the join definition (from clause + unique flag) in the signature so only datasets with identical joins are merged. Refining the key only prevents merges, so identically-joined datasets are unaffected. Adds a regression test that fails without the fix. 2. dev.perfetto.GpuByProcess registers its per-process leaf tracks without rootTableName, so they are invisible to SQL-event resolution even when the slice is found. Fix: pass rootTableName 'slice', matching the id namespace the track's details panel already assumes. Validated on a real GPU trace (GpuRenderStageEvent kernels, one hardware queue split into 4 tracks): before, a ts/dur deep link zoomed but selected nothing; after, the slice is selected and revealed on the visible track.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
dreveman
self-requested a review
August 7, 2026 12:35
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.
Deep links carrying
ts/durquery params (dev.perfetto.DeeplinkQuerystring) zoom to the right viewport but silently fail to select the target slice on GPU traces. Two independent causes:1.
UnionDataset.query()merges datasets whose joins differ.Datasets are grouped for merging by source table and join alias only (
getJoinSignature). The UI tracks created for grouped/split trace-processor tracks (e.g. GPU hardware queues whose overlapping slices TrackCompressor splits into parallel tracks) each join their ownexperimental_slice_layoutdepth table under the shareddepthalias. The merge keeps only one of those join definitions (Object.assign), so the merged branch inner-joins every row through a single depth table and silently drops all rows that only exist in the other groups.resolveSqlEvents()then finds no track for the slice andselectSqlEvent()drops the selection without feedback. Any trace with two or more split tracks is affected.Fix: include the join definition (from clause + unique flag) in the signature so only datasets with identical joins are merged. Refining the key can only prevent merges, so identically-joined datasets keep merging exactly as before; only the previously-corrupted case changes (each dataset becomes its own UNION branch, which is the definitional semantics).
2.
dev.perfetto.GpuByProcesstracks are invisible to SQL-event resolution.The plugin registers its per-process leaf tracks without
rootTableName, so even a successfully found slice cannot resolve to them. Fix: passrootTableName: 'slice', matching the id namespace the track's details panel (ThreadSliceDetailsPanel) already assumes for these datasets (gpu_sliceids aresliceids).Testing
union dataset does not merge datasets whose joins differ) fails without thedataset.tsfix and passes with it; the other union-merge tests pass in both states (no behavior change for legitimate merges).ui/run-unittests: 148 files, 2537 passed / 1 skipped.ui/prettier --checkandui/eslintclean on touched files.visStart/visEnd/ts/durpreviously zoomed correctly but selected nothing; with this change the slice is selected, the track auto-reveals, and the details panel shows the target kernel.