summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-02-14 20:47:23 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-02-14 20:47:23 -0500
commit2e4bb0fc0ca51d08b64f364305661b883e429170 (patch)
tree0df8364bfcaf472e38fefe8a59de7f6066063d54
parent5e9bc06457923893d5acf049ab5d1dd621a865cc (diff)
parentf4e2f0ea339d0b2524dde28c6bf903c06e97c948 (diff)
downloadgem5-2e4bb0fc0ca51d08b64f364305661b883e429170.tar.xz
Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG-- extra : convert_revision : c807a78d9c3f3be51763dab9685aa4b7361c585c
-rw-r--r--SConscript13
-rw-r--r--build/SConstruct11
-rwxr-xr-xutil/pbs/job.py2
3 files changed, 19 insertions, 7 deletions
diff --git a/SConscript b/SConscript
index 8f7899134..19f84f913 100644
--- a/SConscript
+++ b/SConscript
@@ -28,7 +28,6 @@
import os
import sys
-from os.path import isdir
# This file defines how to build a particular configuration of M5
# based on variable settings in the 'env' build environment.
@@ -337,16 +336,18 @@ else:
extra_libraries = []
env.Append(LIBS=['z'])
-if isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \
- isdir('/usr/local/lib/mysql'):
- env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/',
- '/usr/lib/mysql'])
- env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
+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'])
+ if os.path.isdir('/usr/lib64'):
+ env.Append(LIBPATH=['/usr/lib64/mysql'])
+ else:
+ env.Append(LIBPATH=['/usr/lib/mysql/'])
env.Append(LIBS=['mysqlclient'])
+
###################################################
#
# Special build rules.
diff --git a/build/SConstruct b/build/SConstruct
index 5c4ae94a1..3d7db1db2 100644
--- a/build/SConstruct
+++ b/build/SConstruct
@@ -101,12 +101,23 @@ configs_map = {
'KERNEL' : KernelConfig
}
+# Enable detailed full-system binning.
+def MeasureOpt(env):
+ env.Replace(USE_MYSQL = True)
+ env.Append(CPPDEFINES = 'FS_MEASURE')
+
+# Enable MySql database output for stats.
+def MySqlOpt(env):
+ env.Replace(USE_MYSQL = True)
+
# Disable FastAlloc object allocation.
def NoFastAllocOpt(env):
env.Append(CPPDEFINES = 'NO_FAST_ALLOC')
# Configuration options map.
options_map = {
+ 'MEASURE' : MeasureOpt,
+ 'MYSQL' : MySqlOpt,
'NO_FAST_ALLOC' : NoFastAllocOpt
}
diff --git a/util/pbs/job.py b/util/pbs/job.py
index 7c8d4bc16..5eed0cd75 100755
--- a/util/pbs/job.py
+++ b/util/pbs/job.py
@@ -134,7 +134,7 @@ if __name__ == '__main__':
os.symlink(joinpath(jobdir, 'output'), 'status.out')
- args = [ joinpath(basedir, 'm5'), '-d', '%s' % jobdir, joinpath(basedir, 'run.mpy') ]
+ args = [ joinpath(basedir, 'm5'), joinpath(basedir, 'run.mpy') ]
if not len(args):
sys.exit("no arguments")