diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-13 10:21:56 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-13 10:21:56 +0300 |
| commit | 7c15d6058cf56e8c7801259f1f842a3a010c5f41 (patch) | |
| tree | 0b9f85dadade5958a281ab6abaa51dcb620603f2 /scripts | |
| parent | 42d7821dc8d81781f2c3cfc269e99c0ee1dbd017 (diff) | |
fix: guard Pair.CalculateDurations against uint64 underflow on clock skew
BPF timestamps can be non-monotonic across CPUs (NTP step, TSC skew).
When exit < enter or enter < prevPairTime the uint64 subtraction wraps
to a huge value, corrupting latency histograms and flamegraph weights.
Clamp both Duration and DurationToPrev to 0 instead of underflowing.
Add TestPairCalculateDurationsNegativeDelta to cover this case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
