Skip to content

systrap: preserve latency medians across histogram reset - #14431

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl971361249
Open

systrap: preserve latency medians across histogram reset#14431
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl971361249

Conversation

@copybara-service

Copy link
Copy Markdown

systrap: preserve latency medians across histogram reset

sentryOnStubOn records the current stub- and sentry-bound latency medians,
then resets both histograms before evaluating the two fast paths. The stub
check correctly uses the saved values. The sentry check samples the now-empty
histograms again, so it always receives zero and cannot account for the
period that just ended.

Use the saved period medians for the sentry check too. This matches the
other state transitions and ensures both decisions are based on the same
completed measurement period.

Fixes: cffce1a ("systrap: Revise slow-path enablement.")

Tested with:

make test TARGETS='//pkg/sentry/platform/systrap:systrap_test'

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14426 from ayushr2:codex/fix-systrap-fastpath-median 6172a4b

@copybara-service
copybara-service Bot requested a review from nixprime as a code owner August 26, 2026 17:34
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Aug 26, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl971361249 branch 3 times, most recently from 405c759 to 1b478ea Compare August 26, 2026 20:24
sentryOnStubOn records the current stub- and sentry-bound latency medians,
then resets both histograms before evaluating the two fast paths. The stub
check correctly uses the saved values. The sentry check samples the now-empty
histograms again, so it always receives zero and cannot account for the
period that just ended.

Use the saved period medians for the sentry check too. This matches the
other state transitions and ensures both decisions are based on the same
completed measurement period.

Fixes: cffce1a ("systrap: Revise slow-path enablement.")

Tested with:

    make test TARGETS='//pkg/sentry/platform/systrap:systrap_test'

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14426 from ayushr2:codex/fix-systrap-fastpath-median 6172a4b
PiperOrigin-RevId: 971361249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant