Repository navigation
[AIPROFVIS-890] Treat empty track areas as success instead of kRocProfVisResultOutOfRange - #1217
Merged
tomk-amd merged 2 commits intoNov 23, 2026
Merged
Conversation
Clean up all of the downstream code that did special handling for kRocProfVisResultOutOfRange.
A range with 1M or more events is split into two read requests. If one failed to start, the fetch still reported success and the range was marked valid with part of its events missing. The fetch now fails with kRocProfVisResultUnknownError when fewer requests start than were asked for, unless it was cancelled. The requests that did start are still processed so their slices and futures are released.
tomk-amd
marked this pull request as ready for review
November 23, 2026 16:35
tomk-amd
requested review from
Sajeeth-Wimalasuriyan,
amokiche-amd,
drchen-amd and
vstempen
as code owners
November 23, 2026 16: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.
Motivation
This is a patch for PR #1150 (
dhingora/fix-job-exceptions).kRocProfVisResultOutOfRange"errors" being handled can cause segments to get dropped, see table below in details.Fetching a range of a track or graph with no events in it returned
kRocProfVisResultOutOfRange. That isn't an error: the range is just an empty area of the track. Because the code returned it anyway, every caller had to special-case it:DataProviderhid the warning forOutOfRangein three places.TrackItem::HandleTrackDataChangedtreatedOutOfRangeas success.track_eventsbinding, theTimeline::AsyncFetchassert and the controller tests all accepted it as a valid result.So a real
OutOfRangefailure looked the same as an empty range.Separately, a range with 1M or more events is split into two model read requests. If only one of them started, the fetch still returned success and the range was cached as valid with some of its events missing.
Technical Details
Controller
Track::FetchSegments,SegmentTimeline::FetchSegments,Segment::FetchandWaitForAndProcessTraceReadRequestsnow default tokRocProfVisResultSuccess. A range with no segments or no events is a successful, empty fetch.ProcessEventRecordsresets the result to success after skipping an event that is out of range. Before, if the last record was skipped, the whole fetch returnedOutOfRange.Graph::GenerateLODreturnskRocProfVisResultInvalidArgumentfor an LOD that doesn't exist, and succeeds when the requested range doesn't overlap the graph.OutOfRangecases from theTimeline::AsyncFetchassert and from theSegmentTimeline::FetchSegmentswalk.FetchFromDataModelfails withkRocProfVisResultUnknownErrorwhen fewer read requests start than were asked for, unless the fetch was cancelled. The requests that did start are still waited for, so their slices and futures are released.View / Python
DataProvideralways logs a warning when a graph, event or sample request fails.TrackItemextracts points only when the response iskRocProfVisResultSuccess.track_eventsbinding treats onlykRocProfVisResultSuccessas success.Tests
A Test has been added to capture the case of "Graph Range With Empty LOD Segment". Below are the results comparing this fix with PR 1150.
trace_70b_1024_32.rpdkRocProfVisResultOutOfRange(10), 0 entrieskRocProfVisResultSuccess, 1 entrykRocProfVisResultSuccess, 1 entryrocpd-transpose.dbkRocProfVisResultOutOfRange(10), 0 entrieskRocProfVisResultSuccess, 4 entrieskRocProfVisResultSuccess, 4 entries