From: Gabe Black Date: Fri, 15 Dec 2017 01:29:17 +0000 (-0800) Subject: config: Add a --checkpoint-dir argument to read_config.py. X-Git-Tag: v19.0.0.0~2410 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c64c6c9ddc7463edaf4517909d8647b6410c2930;p=gem5.git config: Add a --checkpoint-dir argument to read_config.py. This argument lets the user restore a checkpoint after loading simulator state from config.ini. Change-Id: I6e0630d75b798a1d2536e2408660843f57f46c4b Reviewed-on: https://gem5-review.googlesource.com/6941 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- diff --git a/configs/example/read_config.py b/configs/example/read_config.py index dfd5b7f1a..830bdb8b1 100644 --- a/configs/example/read_config.py +++ b/configs/example/read_config.py @@ -510,6 +510,9 @@ parser = argparse.ArgumentParser() parser.add_argument('config_file', metavar='config-file.ini', help='.ini configuration file to load and run') +parser.add_argument('--checkpoint-dir', type=str, default=None, + help='A checkpoint to directory to restore when starting ' + 'the simulation') args = parser.parse_args(sys.argv[1:]) @@ -526,7 +529,7 @@ mgr = ConfigManager(config) mgr.find_all_objects() -m5.instantiate() +m5.instantiate(args.checkpoint_dir) exit_event = m5.simulate() print 'Exiting @ tick %i because %s' % (