summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/FSConfig.py19
-rw-r--r--configs/common/Options.py14
2 files changed, 32 insertions, 1 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 9b94e7ffa..e94818312 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -405,7 +405,8 @@ def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None, Ruby = False
for i in range(3, 15):
assignISAInt(i, i)
-def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
+def makeLinuxX86System(mem_mode, options, mdesc = None, Ruby = False):
+ numCPUs = options.num_cpus
self = LinuxX86System()
# Build up the x86 system and then specialize it for Linux
@@ -415,6 +416,22 @@ def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
# just to avoid corner cases.
assert(self.physmem.range.second.getValue() >= 0x200000)
+ # set work count options
+ if options.work_item_id != None:
+ self.work_item_id = options.work_item_id
+ if options.work_begin_cpu_id_exit != None:
+ self.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
+ if options.work_end_exit_count != None:
+ self.work_end_exit_count = options.work_end_exit_count
+ if options.work_end_checkpoint_count != None:
+ self.work_end_ckpt_count = options.work_end_checkpoint_count
+ if options.work_begin_exit_count != None:
+ self.work_begin_exit_count = options.work_begin_exit_count
+ if options.work_begin_checkpoint_count != None:
+ self.work_begin_ckpt_count = options.work_begin_checkpoint_count
+ if options.work_cpus_checkpoint_count != None:
+ self.work_cpus_ckpt_count = options.work_cpus_checkpoint_count
+
# Mark the first megabyte of memory as reserved
self.e820_table.entries.append(X86E820Entry(
addr = 0,
diff --git a/configs/common/Options.py b/configs/common/Options.py
index 42e1585d7..7605c7d0d 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -54,6 +54,14 @@ parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
parser.add_option("--maxtime", type="float")
parser.add_option("--maxinsts", type="int")
parser.add_option("--prog_intvl", type="int")
+parser.add_option("--work-item-id", action="store", type="int",
+ help="the specific work id for exit & checkpointing")
+parser.add_option("--work-begin-cpu-id-exit", action="store", type="int",
+ help="exit when work starts on the specified cpu")
+parser.add_option("--work-end-exit-count", action="store", type="int",
+ help="exit at specified work end count")
+parser.add_option("--work-begin-exit-count", action="store", type="int",
+ help="exit at specified work begin count")
# Checkpointing options
@@ -69,6 +77,12 @@ parser.add_option("-r", "--checkpoint-restore", action="store", type="int",
help="restore from checkpoint <N>")
parser.add_option("--checkpoint-at-end", action="store_true",
help="take a checkpoint at end of run")
+parser.add_option("--work-begin-checkpoint-count", action="store", type="int",
+ help="checkpoint at specified work begin count")
+parser.add_option("--work-end-checkpoint-count", action="store", type="int",
+ help="checkpoint at specified work end count")
+parser.add_option("--work-cpus-checkpoint-count", action="store", type="int",
+ help="checkpoint and exit when active cpu count is reached")
# CPU Switching - default switch model goes from a checkpoint