add an option for defining a directory in which to place all your checkpoints. if none, default is cwd.
--HG-- extra : convert_revision : 23a602c2d800c922346c9743cc0c583d178a0ee7
This commit is contained in:
parent
7e63d67f08
commit
54cf456fd1
1 changed files with 10 additions and 4 deletions
|
@ -51,8 +51,10 @@ parser.add_option("-b", "--benchmark", action="store", type="string",
|
||||||
help="Specify the benchmark to run. Available benchmarks: %s"\
|
help="Specify the benchmark to run. Available benchmarks: %s"\
|
||||||
% DefinedBenchmarks)
|
% DefinedBenchmarks)
|
||||||
parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
|
parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
|
||||||
help="Specify the filename to dump a pcap capture of the ethernet"
|
help="Specify the filename to dump a pcap capture of the" \
|
||||||
"traffic")
|
"ethernet traffic")
|
||||||
|
parser.add_option("--checkpoint_dir", action="store", type="string",
|
||||||
|
help="Place all checkpoints in this absolute directory")
|
||||||
|
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
@ -123,7 +125,11 @@ else:
|
||||||
exit_event = m5.simulate(maxtick)
|
exit_event = m5.simulate(maxtick)
|
||||||
|
|
||||||
while exit_event.getCause() == "checkpoint":
|
while exit_event.getCause() == "checkpoint":
|
||||||
|
if options.checkpoint_dir:
|
||||||
|
m5.checkpoint(root, "/".join([options.checkpoint_dir, "cpt.%d"]))
|
||||||
|
else:
|
||||||
m5.checkpoint(root, "cpt.%d")
|
m5.checkpoint(root, "cpt.%d")
|
||||||
|
|
||||||
if maxtick == -1:
|
if maxtick == -1:
|
||||||
exit_event = m5.simulate(maxtick)
|
exit_event = m5.simulate(maxtick)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue