diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2006-10-06 00:42:39 -0400 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2006-10-06 00:42:39 -0400 |
commit | 54cf456fd15b6c88010d35ca310b18f7a415114e (patch) | |
tree | a6e14facc0264fd3fe4ebd64a8130254585d88d0 /configs | |
parent | 7e63d67f084b915ca6c216f41cca0a53abef6444 (diff) | |
download | gem5-54cf456fd15b6c88010d35ca310b18f7a415114e.tar.xz |
add an option for defining a directory in which to place all your checkpoints. if none, default is cwd.
--HG--
extra : convert_revision : 23a602c2d800c922346c9743cc0c583d178a0ee7
Diffstat (limited to 'configs')
-rw-r--r-- | configs/example/fs.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py index 31b31529f..5edda6e5f 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -49,10 +49,12 @@ parser.add_option("--dual", action="store_true", parser.add_option("-b", "--benchmark", action="store", type="string", dest="benchmark", help="Specify the benchmark to run. Available benchmarks: %s"\ - % DefinedBenchmarks) + % DefinedBenchmarks) parser.add_option("--etherdump", action="store", type="string", dest="etherdump", - help="Specify the filename to dump a pcap capture of the ethernet" - "traffic") + help="Specify the filename to dump a pcap capture of the" \ + "ethernet traffic") +parser.add_option("--checkpoint_dir", action="store", type="string", + help="Place all checkpoints in this absolute directory") (options, args) = parser.parse_args() @@ -123,7 +125,11 @@ else: exit_event = m5.simulate(maxtick) while exit_event.getCause() == "checkpoint": - m5.checkpoint(root, "cpt.%d") + if options.checkpoint_dir: + m5.checkpoint(root, "/".join([options.checkpoint_dir, "cpt.%d"])) + else: + m5.checkpoint(root, "cpt.%d") + if maxtick == -1: exit_event = m5.simulate(maxtick) else: |