From a8b2d2f4a97378ceb119b23face718fe7ee95c49 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Fri, 15 Nov 2024 10:03:44 -0800 Subject: [PATCH] Remove logErrorAdjustment. It's not necessary to log the error adjustment every time it happens. It's sufficient to log it when the clock error is too large. PiperOrigin-RevId: 696922088 --- pkg/sentry/time/calibrated_clock.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/sentry/time/calibrated_clock.go b/pkg/sentry/time/calibrated_clock.go index 132de5ccf..47df5d0a1 100644 --- a/pkg/sentry/time/calibrated_clock.go +++ b/pkg/sentry/time/calibrated_clock.go @@ -126,16 +126,13 @@ func (c *CalibratedClock) updateParams(actual Parameters) { c.resetLocked("Unable to update params: %v.", err) return } - logErrorAdjustment(c.ref.clockID, errorNS, c.params, newParams) if errorNS.Magnitude() >= MaxClockError { // We should never get such extreme error, something is very // wrong. Reset everything and start again. // - // N.B. logErrorAdjustment will have already logged the error - // at warning level. - // // TODO(mpratt): We could allow Realtime clock jumps here. + log.Warningf("Clock(%v): error: %v ns, adjusted frequency from %v Hz to %v Hz", c.ref.clockID, errorNS, c.params.Frequency, newParams.Frequency) c.resetLocked("Extreme clock error.") return }