You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG#32413458 FIXES ARITHMETIC EXCEPTION IN NDB_INIT
Fixes arithmetic exception when trying to calculate the amount of
instructions to pause cpu using spinning (introduced in WL#12554).
Under some situations, when trying to measure the time of a cpu pause,
we might end up with an elapsed time of zero (e.g. non-monotonic clock).
Also, if spinning is really fast (100 loops taking less than 100ns) we
might compute an average of zero nanoseconds.
In both cases, this will cause the algorithm to calibrate spinning to
throw an arithmetic exception due to division by zero.
Modifies the algorithm to ignore zero values when computing mean
spinning time.
Change-Id: I55166705e1a0d5fa453aa2a75831db8943321541
0 commit comments