Merge zizzer:/z/m5/Bitkeeper/m5
into zazzer.eecs.umich.edu:/z/rdreslin/m5bk/timing_L1 --HG-- extra : convert_revision : 1892825b1e7ba47353e7a79ca4dcb84b64a73f79
This commit is contained in:
commit
9bb66e7766
7 changed files with 138 additions and 26 deletions
|
@ -139,6 +139,7 @@ compoundFlagMap = {
|
||||||
'ScsiAll' : [ 'ScsiDisk', 'ScsiCtrl', 'ScsiNone' ],
|
'ScsiAll' : [ 'ScsiDisk', 'ScsiCtrl', 'ScsiNone' ],
|
||||||
'DiskImageAll' : [ 'DiskImage', 'DiskImageRead', 'DiskImageWrite' ],
|
'DiskImageAll' : [ 'DiskImage', 'DiskImageRead', 'DiskImageWrite' ],
|
||||||
'EthernetAll' : [ 'Ethernet', 'EthernetPIO', 'EthernetDMA', 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ],
|
'EthernetAll' : [ 'Ethernet', 'EthernetPIO', 'EthernetDMA', 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ],
|
||||||
|
'EthernetNoData' : [ 'Ethernet', 'EthernetPIO', 'EthernetDesc', 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ],
|
||||||
'IdeAll' : [ 'IdeCtrl', 'IdeDisk' ]
|
'IdeAll' : [ 'IdeCtrl', 'IdeDisk' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,6 @@ NSGigE::regStats()
|
||||||
.precision(0)
|
.precision(0)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
txBandwidth
|
txBandwidth
|
||||||
.name(name() + ".txBandwidth")
|
.name(name() + ".txBandwidth")
|
||||||
.desc("Transmit Bandwidth (bits/s)")
|
.desc("Transmit Bandwidth (bits/s)")
|
||||||
|
@ -259,6 +258,34 @@ NSGigE::regStats()
|
||||||
.prereq(rxBytes)
|
.prereq(rxBytes)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
totBandwidth
|
||||||
|
.name(name() + ".totBandwidth")
|
||||||
|
.desc("Total Bandwidth (bits/s)")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totPackets
|
||||||
|
.name(name() + ".totPackets")
|
||||||
|
.desc("Total Packets")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totBytes
|
||||||
|
.name(name() + ".totBytes")
|
||||||
|
.desc("Total Bytes")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totPacketRate
|
||||||
|
.name(name() + ".totPPS")
|
||||||
|
.desc("Total Tranmission Rate (packets/s)")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
txPacketRate
|
txPacketRate
|
||||||
.name(name() + ".txPPS")
|
.name(name() + ".txPPS")
|
||||||
.desc("Packet Tranmission Rate (packets/s)")
|
.desc("Packet Tranmission Rate (packets/s)")
|
||||||
|
@ -449,6 +476,10 @@ NSGigE::regStats()
|
||||||
|
|
||||||
txBandwidth = txBytes * Stats::constant(8) / simSeconds;
|
txBandwidth = txBytes * Stats::constant(8) / simSeconds;
|
||||||
rxBandwidth = rxBytes * Stats::constant(8) / simSeconds;
|
rxBandwidth = rxBytes * Stats::constant(8) / simSeconds;
|
||||||
|
totBandwidth = txBandwidth + rxBandwidth;
|
||||||
|
totBytes = txBytes + rxBytes;
|
||||||
|
totPackets = txPackets + rxPackets;
|
||||||
|
|
||||||
txPacketRate = txPackets / simSeconds;
|
txPacketRate = txPackets / simSeconds;
|
||||||
rxPacketRate = rxPackets / simSeconds;
|
rxPacketRate = rxPackets / simSeconds;
|
||||||
}
|
}
|
||||||
|
@ -2352,6 +2383,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);
|
||||||
|
|
|
@ -379,6 +379,10 @@ class NSGigE : public PciDev
|
||||||
Stats::Scalar<> descDmaWrites;
|
Stats::Scalar<> descDmaWrites;
|
||||||
Stats::Scalar<> descDmaRdBytes;
|
Stats::Scalar<> descDmaRdBytes;
|
||||||
Stats::Scalar<> descDmaWrBytes;
|
Stats::Scalar<> descDmaWrBytes;
|
||||||
|
Stats::Formula totBandwidth;
|
||||||
|
Stats::Formula totPackets;
|
||||||
|
Stats::Formula totBytes;
|
||||||
|
Stats::Formula totPacketRate;
|
||||||
Stats::Formula txBandwidth;
|
Stats::Formula txBandwidth;
|
||||||
Stats::Formula rxBandwidth;
|
Stats::Formula rxBandwidth;
|
||||||
Stats::Formula txPacketRate;
|
Stats::Formula txPacketRate;
|
||||||
|
|
31
dev/sinic.cc
31
dev/sinic.cc
|
@ -191,6 +191,34 @@ Device::regStats()
|
||||||
.prereq(rxBytes)
|
.prereq(rxBytes)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
totBandwidth
|
||||||
|
.name(name() + ".totBandwidth")
|
||||||
|
.desc("Total Bandwidth (bits/s)")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totPackets
|
||||||
|
.name(name() + ".totPackets")
|
||||||
|
.desc("Total Packets")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totBytes
|
||||||
|
.name(name() + ".totBytes")
|
||||||
|
.desc("Total Bytes")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
|
totPacketRate
|
||||||
|
.name(name() + ".totPPS")
|
||||||
|
.desc("Total Tranmission Rate (packets/s)")
|
||||||
|
.precision(0)
|
||||||
|
.prereq(totBytes)
|
||||||
|
;
|
||||||
|
|
||||||
txBytes
|
txBytes
|
||||||
.name(name() + ".txBytes")
|
.name(name() + ".txBytes")
|
||||||
.desc("Bytes Transmitted")
|
.desc("Bytes Transmitted")
|
||||||
|
@ -258,6 +286,9 @@ Device::regStats()
|
||||||
|
|
||||||
txBandwidth = txBytes * Stats::constant(8) / simSeconds;
|
txBandwidth = txBytes * Stats::constant(8) / simSeconds;
|
||||||
rxBandwidth = rxBytes * Stats::constant(8) / simSeconds;
|
rxBandwidth = rxBytes * Stats::constant(8) / simSeconds;
|
||||||
|
totBandwidth = txBandwidth + rxBandwidth;
|
||||||
|
totBytes = txBytes + rxBytes;
|
||||||
|
totPackets = txPackets + rxPackets;
|
||||||
txPacketRate = txPackets / simSeconds;
|
txPacketRate = txPackets / simSeconds;
|
||||||
rxPacketRate = rxPackets / simSeconds;
|
rxPacketRate = rxPackets / simSeconds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,6 +262,10 @@ class Device : public Base
|
||||||
|
|
||||||
Stats::Scalar<> txBytes;
|
Stats::Scalar<> txBytes;
|
||||||
Stats::Formula txBandwidth;
|
Stats::Formula txBandwidth;
|
||||||
|
Stats::Formula totBandwidth;
|
||||||
|
Stats::Formula totPackets;
|
||||||
|
Stats::Formula totBytes;
|
||||||
|
Stats::Formula totPacketRate;
|
||||||
Stats::Scalar<> txPackets;
|
Stats::Scalar<> txPackets;
|
||||||
Stats::Formula txPacketRate;
|
Stats::Formula txPacketRate;
|
||||||
Stats::Scalar<> txIpPackets;
|
Stats::Scalar<> txIpPackets;
|
||||||
|
|
|
@ -307,7 +307,7 @@ class Scalar(Statistic,FormulaStat):
|
||||||
|
|
||||||
class Vector(Statistic,FormulaStat):
|
class Vector(Statistic,FormulaStat):
|
||||||
def getValue(self):
|
def getValue(self):
|
||||||
return source.data(self, self.bins);
|
return source.data(self, self.bins, self.ticks);
|
||||||
|
|
||||||
def display(self):
|
def display(self):
|
||||||
import display
|
import display
|
||||||
|
|
|
@ -6,7 +6,19 @@ 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]
|
||||||
[-s <system>] [-r <runs> ] [-u <username>] <command> [command args]
|
[-s <system>] [-r <runs> ] [-T <samples>] [-u <username>]
|
||||||
|
<command> [command args]
|
||||||
|
|
||||||
|
commands extra parameters description
|
||||||
|
----------- ------------------ ---------------------------------------
|
||||||
|
bins [regex] List bins (only matching regex)
|
||||||
|
formula <formula> Evaluated formula specified
|
||||||
|
formulas [regex] List formulas (only matching regex)
|
||||||
|
runs none List all runs in database
|
||||||
|
samples none List samples present in database
|
||||||
|
stability <pairnum> <stats> Calculated statistical info about stats
|
||||||
|
stat <regex> Show stat data (only matching regex)
|
||||||
|
stats [regex] List all stats (only matching regex)
|
||||||
''' % sys.argv[0]
|
''' % sys.argv[0]
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -251,18 +263,26 @@ def commands(options, command, args):
|
||||||
return
|
return
|
||||||
|
|
||||||
if command == 'stability':
|
if command == 'stability':
|
||||||
stats = info.source.getStat(args[0])
|
if len(args) < 2:
|
||||||
info.source.get = "avg"
|
raise CommandException
|
||||||
|
|
||||||
|
try:
|
||||||
|
merge = int(args[0])
|
||||||
|
except ValueError:
|
||||||
|
usage()
|
||||||
|
stats = info.source.getStat(args[1])
|
||||||
|
info.source.get = "sum"
|
||||||
|
|
||||||
|
|
||||||
#loop through all the stats selected
|
#loop through all the stats selected
|
||||||
for stat in stats:
|
for stat in stats:
|
||||||
|
|
||||||
print "%s:" % stat.name
|
print "%s:" % stat.name
|
||||||
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %10s" % \
|
||||||
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP", "CV")
|
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP", "CV")
|
||||||
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %10s" % \
|
||||||
("--------------------", "------------",
|
("--------------------", "------------",
|
||||||
"------------", "----", "-----", "-----", "-----", "------")
|
"------------", "----", "-----", "-----", "-----", "----------")
|
||||||
#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;
|
||||||
|
@ -270,38 +290,58 @@ def commands(options, command, args):
|
||||||
#throw away the first one, it's 0
|
#throw away the first one, it's 0
|
||||||
runTicks.pop(0)
|
runTicks.pop(0)
|
||||||
info.globalTicks = runTicks
|
info.globalTicks = runTicks
|
||||||
avg = float(stat)
|
avg = 0
|
||||||
stdev = 0
|
stdev = 0
|
||||||
numoutsideavg = 0
|
numoutsideavg = 0
|
||||||
numoutside1std = 0
|
numoutside1std = 0
|
||||||
numoutside2std = 0
|
numoutside2std = 0
|
||||||
|
pairRunTicks = []
|
||||||
|
if float(stat) == 1e300*1e300:
|
||||||
|
continue
|
||||||
|
for t in range(0, len(runTicks)-(merge-1), merge):
|
||||||
|
tempPair = []
|
||||||
|
for p in range(0,merge):
|
||||||
|
tempPair.append(runTicks[t+p])
|
||||||
|
pairRunTicks.append(tempPair)
|
||||||
#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 pairRunTicks:
|
||||||
#stat.ticks = str(tick)
|
info.globalTicks = tick
|
||||||
info.globalTicks = [ tick ]
|
avg += float(stat)
|
||||||
|
avg /= len(pairRunTicks)
|
||||||
|
for tick in pairRunTicks:
|
||||||
|
info.globalTicks = tick
|
||||||
|
val = float(stat)
|
||||||
|
stdev += pow((val-avg),2)
|
||||||
|
stdev = math.sqrt(stdev / len(pairRunTicks))
|
||||||
|
for tick in pairRunTicks:
|
||||||
|
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
|
||||||
stdev += pow((val-avg),2)
|
|
||||||
|
|
||||||
stdev = math.sqrt(stdev / len(runTicks))
|
|
||||||
for tick in runTicks:
|
|
||||||
info.globalTicks = [ tick ]
|
|
||||||
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
|
||||||
|
if avg > 1000:
|
||||||
print "%-20s %12s %12s %4s %5s %5s %5s %6s" % \
|
print "%-20s %12s %12s %4s %5s %5s %5s %10s" % \
|
||||||
(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(pairRunTicks),
|
||||||
"%.1f" % (stdev/avg*100))
|
"%.3f" % (stdev/avg*100))
|
||||||
|
elif avg > 100:
|
||||||
|
print "%-20s %12s %12s %4s %5s %5s %5s %10s" % \
|
||||||
|
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
||||||
|
"%d" % numoutsideavg, "%d" % numoutside1std,
|
||||||
|
"%d" % numoutside2std, "%d" % len(pairRunTicks),
|
||||||
|
"%.5f" % (stdev/avg*100))
|
||||||
|
else:
|
||||||
|
print "%-20s %12s %12s %4s %5s %5s %5s %10s" % \
|
||||||
|
(run.name, "%.5f" % avg, "%.5f" % stdev,
|
||||||
|
"%d" % numoutsideavg, "%d" % numoutside1std,
|
||||||
|
"%d" % numoutside2std, "%d" % len(pairRunTicks),
|
||||||
|
"%.7f" % (stdev/avg*100))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
if command == 'stats':
|
if command == 'stats':
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
info.source.listStats()
|
info.source.listStats()
|
||||||
|
|
Loading…
Reference in a new issue