tp: suppress spurious clock sync errors for deferred packets#5171
Open
LalitMaganti wants to merge 1 commit intomainfrom
Open
tp: suppress spurious clock sync errors for deferred packets#5171LalitMaganti wants to merge 1 commit intomainfrom
LalitMaganti wants to merge 1 commit intomainfrom
Conversation
When a packet arrives with a sequence-scoped clock before its ClockSnapshot, ToTraceTime fails and records a spurious clock_sync_failure_unknown_source_clock error even though the packet will be resolved later at EOF. Fix this by plumbing a suppress_errors bool through the conversion path (ClockSynchronizer::Convert -> ConvertSlowpath). Before EOF, errors are suppressed and the packet is deferred. At EOF, errors are allowed so genuinely broken clocks are still reported. Extract the convert-or-defer logic into an inline helper ResolveTimestampToTraceTime with a clear three-state return (kResolved, kDeferred, kDropped) to make the hot path readable. Add clock_sync_failure_undeferrable_packet_loss stat (with import logging) for the rare case where conversion fails and deferral is not possible. Bug: #5163
df64615 to
e8d6a63
Compare
🎨 Perfetto UI Builds
|
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.
suppress_errorsbool throughClockSynchronizer::Convert→ConvertSlowpathto skip recording clock sync errors when a packet will be deferred for later resolutionResolveTimestampToTraceTimewith a clear three-state enum (kResolved,kDeferred,kDropped) for readabilityclock_sync_failure_undeferrable_packet_lossstat (via import logging) for the rare case where conversion fails and deferral is not possibleclock_sync_failure_unknown_source_clockerror when a sequence-scoped clock packet arrives before itsClockSnapshotFixes #5163