summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-01-14 00:05:49 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-01-14 00:05:49 -0500
commit3e5a3df24f06b22ee1c155f3e3d3948d9140754a (patch)
treecb67c8c98544d698eb3a4335c6d8d2f46f8aefe4
parent0f0c80ad8c7ee871b848bcbc9e83f9f56fd724a4 (diff)
parent21c6dd80d76c888e662bfd511cc7764d57b29d9f (diff)
downloadgem5-3e5a3df24f06b22ee1c155f3e3d3948d9140754a.tar.xz
automerged had issues with the options.XXXXX in stats.py
--HG-- extra : convert_revision : 44db6642c1fb46eb515acd5a6d8465859a40891a
-rw-r--r--util/stats/info.py4
-rwxr-xr-xutil/stats/stats.py13
2 files changed, 12 insertions, 5 deletions
diff --git a/util/stats/info.py b/util/stats/info.py
index fa318a650..d11619765 100644
--- a/util/stats/info.py
+++ b/util/stats/info.py
@@ -152,7 +152,7 @@ class Statistic(object):
if attr == 'bins':
if value is not None:
value = source.getBin(value)
- elif attr == 'samples' and type(value) is str:
+ elif attr == 'ticks' and type(value) is str:
value = [ int(x) for x in value.split() ]
self.__dict__[attr] = value
@@ -252,7 +252,7 @@ class FormulaStat(object):
class Scalar(Statistic,FormulaStat):
def getValue(self):
- return source.data(self, self.bins)
+ return source.data(self, self.bins, self.ticks)
def display(self):
import display
diff --git a/util/stats/stats.py b/util/stats/stats.py
index 05ee1b4d3..b2b0ff8ad 100755
--- a/util/stats/stats.py
+++ b/util/stats/stats.py
@@ -268,6 +268,10 @@ def commands(options, command, args):
if options.graph:
graphdata(runs, options, stat.name, stat.name, stat)
else:
+ if options.ticks:
+ print 'only displaying sample %s' % options.ticks
+ stat.ticks = options.ticks
+
if options.binned:
print 'kernel ticks'
stat.bins = 'kernel'
@@ -282,7 +286,7 @@ def commands(options, command, args):
printdata(runs, stat)
print 'interrupt ticks'
- stat.bins = 'user'
+ stat.bins = 'interrupt'
printdata(runs, stat)
print 'total ticks'
@@ -315,7 +319,7 @@ def commands(options, command, args):
printdata(runs, stat)
print 'interrupt ticks'
- stat.bins = 'user'
+ stat.bins = 'interrupt'
printdata(runs, stat)
print 'total ticks'
@@ -645,8 +649,9 @@ if __name__ == '__main__':
options.binned = False
options.graph = False
options.graph68 = False
+ options.ticks = False
- opts, args = getopts(sys.argv[1:], '-6BEFGd:g:h:pr:s:u:')
+ opts, args = getopts(sys.argv[1:], '-6BEFGd:g:h:pr:s:u:T:')
for o,a in opts:
if o == '-6':
options.graph68 = True
@@ -672,6 +677,8 @@ if __name__ == '__main__':
options.user = a
if o == '-s':
options.system = a
+ if o == '-T':
+ options.ticks = a
if len(args) == 0:
usage()