- Call self.checkstamp() in the cpu load parsing functions in case the

timestamp has wrapped.
This commit is contained in:
Jeff Roberson 2004-12-26 02:02:34 +00:00
parent 3e16b3e04f
commit b0e485185f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139320

View File

@ -990,6 +990,8 @@ def sched_prio(self, cpu, timestamp, td, pcomm, prio, newprio, bytd, bypcomm):
Lend(bythread, cpu, timestamp, newprio, thread)
def cpuload(self, cpu, timestamp, count):
if (self.checkstamp(timestamp) == 0):
return
cpu = int(cpu)
try:
load = self.load[cpu]
@ -1000,6 +1002,8 @@ def cpuload(self, cpu, timestamp, count):
Count(load, cpu, timestamp, count)
def loadglobal(self, cpu, timestamp, count):
if (self.checkstamp(timestamp) == 0):
return
cpu = 0
try:
load = self.load[cpu]