summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2005-01-12 15:22:58 -0500
committerRon Dreslinski <rdreslin@umich.edu>2005-01-12 15:22:58 -0500
commit3edc239c1320b688294ff6c83b8da922e5c7f53b (patch)
tree8cbbbdbc95ecff1f02f0f587f4066d7132b2e95c
parenta435be1b00657c9bbce95fec49b242c9089715f4 (diff)
parent0f0c80ad8c7ee871b848bcbc9e83f9f56fd724a4 (diff)
downloadgem5-3edc239c1320b688294ff6c83b8da922e5c7f53b.tar.xz
Merge from changes to Memtype and Bustype and Automerge
--HG-- extra : convert_revision : 143fdcc333084c7ba04291e0c299f99566b73cc3
-rw-r--r--SConscript3
-rw-r--r--base/random.cc2
-rw-r--r--base/random.hh24
-rw-r--r--dev/io_device.hh2
-rw-r--r--util/stats/db.py2
-rwxr-xr-xutil/stats/stats.py77
6 files changed, 90 insertions, 20 deletions
diff --git a/SConscript b/SConscript
index 3938f792f..f6c472216 100644
--- a/SConscript
+++ b/SConscript
@@ -65,6 +65,7 @@ base_sources = Split('''
base/pollevent.cc
base/python.cc
base/range.cc
+ base/random.cc
base/sat_counter.cc
base/socket.cc
base/statistics.cc
@@ -413,12 +414,12 @@ else:
obj_desc_files += syscall_emulation_obj_desc_files
extra_libraries = []
+env.Append(LIBS=['z'])
if env['USE_MYSQL']:
sources += mysql_sources
env.Append(CPPDEFINES = 'USE_MYSQL')
env.Append(CPPDEFINES = 'STATS_BINNING')
env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
- env.Append(LIBS=['z'])
if os.path.isdir('/usr/lib64'):
env.Append(LIBPATH=['/usr/lib64/mysql'])
else:
diff --git a/base/random.cc b/base/random.cc
index f18ed546d..9a4562e8a 100644
--- a/base/random.cc
+++ b/base/random.cc
@@ -39,7 +39,7 @@ class RandomContext : public ParamContext
public:
RandomContext(const string &_iniSection)
: ::ParamContext(_iniSection) {}
- ~RandomContext();
+ ~RandomContext() {}
void checkParams();
};
diff --git a/base/random.hh b/base/random.hh
index 5169c548a..0bfed100c 100644
--- a/base/random.hh
+++ b/base/random.hh
@@ -26,8 +26,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __RANDOM_HH__
-#define __RANDOM_HH__
+#ifndef __BASE_RANDOM_HH__
+#define __BASE_RANDOM_HH__
#include "sim/host.hh"
@@ -45,56 +45,56 @@ struct Random<int8_t>
struct Random<uint8_t>
{
- uint8_t get()
+ static uint8_t get()
{ return getLong() & (uint8_t)-1; }
};
struct Random<int16_t>
{
- int16_t get()
+ static int16_t get()
{ return getLong() & (int16_t)-1; }
};
struct Random<uint16_t>
{
- uint16_t get()
+ static uint16_t get()
{ return getLong() & (uint16_t)-1; }
};
struct Random<int32_t>
{
- int32_t get()
+ static int32_t get()
{ return (int32_t)getLong(); }
};
struct Random<uint32_t>
{
- uint32_t get()
+ static uint32_t get()
{ return (uint32_t)getLong(); }
};
struct Random<int64_t>
{
- int64_t get()
+ static int64_t get()
{ return (int64_t)getLong() << 32 || (uint64_t)getLong(); }
};
struct Random<uint64_t>
{
- uint64_t get()
+ static uint64_t get()
{ return (uint64_t)getLong() << 32 || (uint64_t)getLong(); }
};
struct Random<float>
{
- float get()
+ static float get()
{ return getDouble(); }
};
struct Random<double>
{
- double get()
+ static double get()
{ return getDouble(); }
};
-#endif // __RANDOM_HH__
+#endif // __BASE_RANDOM_HH__
diff --git a/dev/io_device.hh b/dev/io_device.hh
index f49afc0a6..8c9dc4a35 100644
--- a/dev/io_device.hh
+++ b/dev/io_device.hh
@@ -34,7 +34,7 @@
class BaseInterface;
class Bus;
class HierParams;
-template <class Bus> class DMAInterface;
+template <class BusType> class DMAInterface;
class PioDevice : public FunctionalMemory
{
diff --git a/util/stats/db.py b/util/stats/db.py
index 4cba82446..495cdb5b5 100644
--- a/util/stats/db.py
+++ b/util/stats/db.py
@@ -171,7 +171,7 @@ class Database(object):
self.query('select * from formulas')
for id,formula in self.cursor.fetchall():
- self.allFormulas[int(id)] = formula
+ self.allFormulas[int(id)] = formula.tostring()
StatData.db = self
self.query('select * from stats')
diff --git a/util/stats/stats.py b/util/stats/stats.py
index 68ba2b8ea..05ee1b4d3 100755
--- a/util/stats/stats.py
+++ b/util/stats/stats.py
@@ -39,7 +39,73 @@ def unique(list):
map(set.__setitem__, list, [])
return set.keys()
+def graphdata68(runs, options, tag, label, value):
+ import info
+ configs = ['ste', 'hte', 'htd', 'ocm', 'occ', 'ocp' ]
+ benchmarks = [ 'm', 's', 'snt', 'nb1', 'w1', 'w2', 'w3', 'w4', 'nm', 'ns', 'nw1', 'nw2', 'nw3' ]
+ dmas = [ 'x' ]
+ caches = [ '2', '4' ]
+
+ names = []
+
+ bench_system = {
+ 'm' : 'client',
+ 's' : 'client',
+ 'snt' : 'client',
+ 'nb1' : 'server',
+ 'nb2' : 'server',
+ 'nt1' : 'server',
+ 'nt2' : 'server',
+ 'w1' : 'server',
+ 'w2' : 'server',
+ 'w3' : 'server',
+ 'w4' : 'server',
+ 'w1s' : 'server',
+ 'w2s' : 'server',
+ 'w3s' : 'server',
+ 'ns' : 'natbox',
+ 'nm' : 'natbox',
+ 'nw1' : 'natbox',
+ 'nw2' : 'natbox',
+ 'nw3' : 'natbox'
+ }
+
+ for bench in benchmarks:
+ if bench_system[bench] != options.system:
+ continue
+
+ for dma in dmas:
+ for cache in caches:
+ names.append([bench, dma, cache])
+
+ for bench,dma,cache in names:
+ base = '%s.%s.%s' % (bench, dma, cache)
+ fname = 'data/%s.%s.68.dat' % (tag, base)
+ f = open(fname, 'w')
+ print >>f, '#set TITLE = '
+ print >>f, '#set ylbl = %s' % label
+ #print >>f, '#set sublabels = %s' % ' '.join(configs)
+ print >>f, '#set sublabels = ste hte htd ocm occ ocs'
+
+ for speed,freq in zip(['s', '6', '8', 'q'],['4GHz', '6GHz','8GHz', '10GHz']):
+ print >>f, '"%s"' % freq,
+ for conf in configs:
+ name = '%s.%s.%s.%s.%s' % (conf, bench, dma, cache, speed)
+ run = info.source.allRunNames[name]
+ info.display_run = run.run;
+ val = float(value)
+ if val == 1e300*1e300:
+ print >>f, 0.0,
+ else:
+ print >>f, "%f" % val,
+ print >>f
+ f.close()
+
def graphdata(runs, options, tag, label, value):
+ if options.graph68:
+ graphdata68(runs, options, tag, label, value)
+ return
+
import info
configs = ['ste', 'hte', 'htd', 'ocm', 'occ', 'ocp' ]
#benchmarks = [ 'm', 's', 'nb1', 'nb2', 'nt1', 'nt2', 'w1', 'w2', 'w3', 'w4', 'ns', 'nm', 'nw1', 'nw2', 'nw3' ]
@@ -85,10 +151,10 @@ def graphdata(runs, options, tag, label, value):
base = '%s.%s.%s' % (bench, dma, cache)
fname = 'data/%s.%s.dat' % (tag, base)
f = open(fname, 'w')
- print >>f, '#set TITLE = %s' % base
- print >>f, '#set xlbl = Configuration'
+ print >>f, '#set TITLE = '
print >>f, '#set ylbl = %s' % label
- print >>f, '#set sublabels = %s' % ' '.join(configs)
+ #print >>f, '#set sublabels = %s' % ' '.join(configs)
+ print >>f, '#set sublabels = ste hte htd ocm occ ocs'
for speed,freq in zip(['s', 'q'],['4GHz','10GHz']):
print >>f, '"%s"' % freq,
@@ -578,9 +644,12 @@ if __name__ == '__main__':
options.get = None
options.binned = False
options.graph = False
+ options.graph68 = False
- opts, args = getopts(sys.argv[1:], '-BEFGd:g:h:pr:s:u:')
+ opts, args = getopts(sys.argv[1:], '-6BEFGd:g:h:pr:s:u:')
for o,a in opts:
+ if o == '-6':
+ options.graph68 = True
if o == '-B':
options.binned = True
if o == '-E':