Skip to content

Commit

Permalink
Remove logErrorAdjustment.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nlacasse authored and gvisor-bot committed Nov 15, 2024
1 parent 39a6242 commit a8b2d2f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/sentry/time/calibrated_clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a8b2d2f

Please sign in to comment.