Merge zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5-patched/m5-new --HG-- extra : convert_revision : 3b9413a6861eaddb8de753d76e217106d41cc347
This commit is contained in:
commit
6ac7954242
5 changed files with 39 additions and 16 deletions
|
@ -2352,6 +2352,7 @@ NSGigE::serialize(ostream &os)
|
||||||
bool txPacketExists = txPacket;
|
bool txPacketExists = txPacket;
|
||||||
SERIALIZE_SCALAR(txPacketExists);
|
SERIALIZE_SCALAR(txPacketExists);
|
||||||
if (txPacketExists) {
|
if (txPacketExists) {
|
||||||
|
txPacket->length = txPacketBufPtr - txPacket->data;
|
||||||
txPacket->serialize("txPacket", os);
|
txPacket->serialize("txPacket", os);
|
||||||
uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
|
uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
|
||||||
SERIALIZE_SCALAR(txPktBufPtr);
|
SERIALIZE_SCALAR(txPktBufPtr);
|
||||||
|
|
|
@ -60,7 +60,6 @@ PacketFifo::unserialize(const string &base, Checkpoint *cp,
|
||||||
paramIn(cp, section, base + ".packets", fifosize);
|
paramIn(cp, section, base + ".packets", fifosize);
|
||||||
|
|
||||||
fifo.clear();
|
fifo.clear();
|
||||||
fifo.resize(fifosize);
|
|
||||||
|
|
||||||
for (int i = 0; i < fifosize; ++i) {
|
for (int i = 0; i < fifosize; ++i) {
|
||||||
PacketPtr p = new PacketData(16384);
|
PacketPtr p = new PacketData(16384);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from Device import FooPioDevice, DmaDevice
|
from Device import FooPioDevice, DmaDevice
|
||||||
|
|
||||||
simobj PciConfigData(FooPioDevice):
|
simobj PciConfigData(FooPioDevice):
|
||||||
addr = 0xffffffffffffffff
|
addr = 0xffffffffffffffffL
|
||||||
VendorID = Param.UInt16("Vendor ID")
|
VendorID = Param.UInt16("Vendor ID")
|
||||||
DeviceID = Param.UInt16("Device ID")
|
DeviceID = Param.UInt16("Device ID")
|
||||||
Command = Param.UInt16(0, "Command")
|
Command = Param.UInt16(0, "Command")
|
||||||
|
@ -47,4 +47,4 @@ simobj PciDevice(DmaDevice):
|
||||||
pci_func = Param.Int("PCI function code")
|
pci_func = Param.Int("PCI function code")
|
||||||
configdata = Param.PciConfigData(Super, "PCI Config data")
|
configdata = Param.PciConfigData(Super, "PCI Config data")
|
||||||
configspace = Param.PciConfigAll(Super, "PCI Configspace")
|
configspace = Param.PciConfigAll(Super, "PCI Configspace")
|
||||||
addr = 0xffffffffffffffff
|
addr = 0xffffffffffffffffL
|
||||||
|
|
|
@ -3,6 +3,8 @@ import operator, re, types
|
||||||
|
|
||||||
source = None
|
source = None
|
||||||
display_run = 0
|
display_run = 0
|
||||||
|
global globalTicks
|
||||||
|
globalTicks = None
|
||||||
|
|
||||||
def issequence(t):
|
def issequence(t):
|
||||||
return isinstance(t, types.TupleType) or isinstance(t, types.ListType)
|
return isinstance(t, types.TupleType) or isinstance(t, types.ListType)
|
||||||
|
@ -130,6 +132,7 @@ def cmp(a, b):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
class Statistic(object):
|
class Statistic(object):
|
||||||
|
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
self.__dict__.update(data.__dict__)
|
self.__dict__.update(data.__dict__)
|
||||||
if not self.__dict__.has_key('value'):
|
if not self.__dict__.has_key('value'):
|
||||||
|
@ -138,9 +141,25 @@ class Statistic(object):
|
||||||
self.__dict__['bins'] = None
|
self.__dict__['bins'] = None
|
||||||
if not self.__dict__.has_key('ticks'):
|
if not self.__dict__.has_key('ticks'):
|
||||||
self.__dict__['ticks'] = None
|
self.__dict__['ticks'] = None
|
||||||
|
if 'vc' not in self.__dict__:
|
||||||
|
self.vc = {}
|
||||||
|
|
||||||
def __getattribute__(self, attr):
|
def __getattribute__(self, attr):
|
||||||
|
if attr == 'ticks':
|
||||||
|
if self.__dict__['ticks'] != globalTicks:
|
||||||
|
self.__dict__['value'] = None
|
||||||
|
self.__dict__['ticks'] = globalTicks
|
||||||
|
return self.__dict__['ticks']
|
||||||
if attr == 'value':
|
if attr == 'value':
|
||||||
|
if self.__dict__['ticks'] != globalTicks:
|
||||||
|
if self.__dict__['ticks'] != None and \
|
||||||
|
len(self.__dict__['ticks']) == 1:
|
||||||
|
self.vc[self.__dict__['ticks'][0]] = self.__dict__['value']
|
||||||
|
self.__dict__['ticks'] = globalTicks
|
||||||
|
if len(globalTicks) == 1 and self.vc.has_key(globalTicks[0]):
|
||||||
|
self.__dict__['value'] = self.vc[globalTicks[0]]
|
||||||
|
else:
|
||||||
|
self.__dict__['value'] = None
|
||||||
if self.__dict__['value'] == None:
|
if self.__dict__['value'] == None:
|
||||||
self.__dict__['value'] = self.getValue()
|
self.__dict__['value'] = self.getValue()
|
||||||
return self.__dict__['value']
|
return self.__dict__['value']
|
||||||
|
@ -152,11 +171,12 @@ class Statistic(object):
|
||||||
if attr == 'bins':
|
if attr == 'bins':
|
||||||
if value is not None:
|
if value is not None:
|
||||||
value = source.getBin(value)
|
value = source.getBin(value)
|
||||||
elif attr == 'ticks' and type(value) is str:
|
#elif attr == 'ticks' and type(value) is str:
|
||||||
value = [ int(x) for x in value.split() ]
|
# value = [ int(x) for x in value.split() ]
|
||||||
|
|
||||||
self.__dict__[attr] = value
|
self.__dict__[attr] = value
|
||||||
self.__dict__['value'] = None
|
self.__dict__['value'] = None
|
||||||
|
self.vc = {}
|
||||||
else:
|
else:
|
||||||
super(Statistic, self).__setattr__(attr, value)
|
super(Statistic, self).__setattr__(attr, value)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
import re, sys, math
|
import re, sys, math
|
||||||
|
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print '''\
|
print '''\
|
||||||
Usage: %s [-E] [-F] [-d <db> ] [-g <get> ] [-h <host>] [-p]
|
Usage: %s [-E] [-F] [-d <db> ] [-g <get> ] [-h <host>] [-p]
|
||||||
|
@ -257,18 +258,18 @@ def commands(options, command, args):
|
||||||
for stat in stats:
|
for stat in stats:
|
||||||
|
|
||||||
print "%s:" % stat.name
|
print "%s:" % stat.name
|
||||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
||||||
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP")
|
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP", "CV")
|
||||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
||||||
("------------------------------", "------------",
|
("--------------------", "------------",
|
||||||
"------------", "----", "-----", "-----", "-----")
|
"------------", "----", "-----", "-----", "-----", "------")
|
||||||
#loop through all the selected runs
|
#loop through all the selected runs
|
||||||
for run in runs:
|
for run in runs:
|
||||||
info.display_run = run.run;
|
info.display_run = run.run;
|
||||||
runTicks = info.source.retTicks([ run ])
|
runTicks = info.source.retTicks([ run ])
|
||||||
#throw away the first one, it's 0
|
#throw away the first one, it's 0
|
||||||
runTicks.pop(0)
|
runTicks.pop(0)
|
||||||
stat.ticks = runTicks
|
info.globalTicks = runTicks
|
||||||
avg = float(stat)
|
avg = float(stat)
|
||||||
stdev = 0
|
stdev = 0
|
||||||
numoutsideavg = 0
|
numoutsideavg = 0
|
||||||
|
@ -277,7 +278,8 @@ def commands(options, command, args):
|
||||||
|
|
||||||
#loop through all the various ticks for each run
|
#loop through all the various ticks for each run
|
||||||
for tick in runTicks:
|
for tick in runTicks:
|
||||||
stat.ticks = str(tick)
|
#stat.ticks = str(tick)
|
||||||
|
info.globalTicks = [ tick ]
|
||||||
val = float(stat)
|
val = float(stat)
|
||||||
if (val < (avg * .9)) or (val > (avg * 1.1)):
|
if (val < (avg * .9)) or (val > (avg * 1.1)):
|
||||||
numoutsideavg += 1
|
numoutsideavg += 1
|
||||||
|
@ -285,17 +287,18 @@ def commands(options, command, args):
|
||||||
|
|
||||||
stdev = math.sqrt(stdev / len(runTicks))
|
stdev = math.sqrt(stdev / len(runTicks))
|
||||||
for tick in runTicks:
|
for tick in runTicks:
|
||||||
stat.ticks = str(tick)
|
info.globalTicks = [ tick ]
|
||||||
val = float(stat)
|
val = float(stat)
|
||||||
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
||||||
numoutside1std += 1
|
numoutside1std += 1
|
||||||
if (val < (avg - (2*stdev))) or (val > (avg + (2*stdev))):
|
if (val < (avg - (2*stdev))) or (val > (avg + (2*stdev))):
|
||||||
numoutside2std += 1
|
numoutside2std += 1
|
||||||
|
|
||||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
||||||
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
||||||
"%d" % numoutsideavg, "%d" % numoutside1std,
|
"%d" % numoutsideavg, "%d" % numoutside1std,
|
||||||
"%d" % numoutside2std, "%d" % len(runTicks))
|
"%d" % numoutside2std, "%d" % len(runTicks),
|
||||||
|
"%.1f" % (stdev/avg*100))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,7 +323,7 @@ def commands(options, command, args):
|
||||||
else:
|
else:
|
||||||
if options.ticks:
|
if options.ticks:
|
||||||
print 'only displaying sample %s' % options.ticks
|
print 'only displaying sample %s' % options.ticks
|
||||||
stat.ticks = options.ticks
|
info.globalTicks = [ int(x) for x in options.ticks.split() ]
|
||||||
|
|
||||||
if options.binned:
|
if options.binned:
|
||||||
print 'kernel ticks'
|
print 'kernel ticks'
|
||||||
|
|
Loading…
Reference in a new issue