[gem5-dev] Change in gem5/gem5[minor-release-staging-v21-0-1]: configs: restore_simpoint_checkpoint should be a boolean
Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/45825 ) Change subject: configs: restore_simpoint_checkpoint should be a boolean .. configs: restore_simpoint_checkpoint should be a boolean The --restore_simpoint_checkpoint option is a boolean; however if no default value is supplied, optparse sets the default value to None This is not valid for argparse. Argparse recognizes the store_true action and it is automatically treating the option as a boolean, hence providing a default=False instead of default=None Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44765 Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45825 --- M configs/common/Options.py M configs/common/Simulation.py 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Daniel Carvalho: Looks good to me, approved Jason Lowe-Power: Looks good to me, approved kokoro: Regressions pass diff --git a/configs/common/Options.py b/configs/common/Options.py index c48bfe6..b833531 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -305,6 +305,7 @@ parser.add_option("--take-simpoint-checkpoints", action="store", type="string", help="") parser.add_option("--restore-simpoint-checkpoint", action="store_true", +default=False, help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index 067bc01..3b9efc0 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -710,7 +710,7 @@ takeSimpointCheckpoints(simpoints, interval_length, cptdir) # Restore from SimPoint checkpoints -elif options.restore_simpoint_checkpoint != None: +elif options.restore_simpoint_checkpoint: restoreSimpointCheckpoint() else: 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45825 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: minor-release-staging-v21-0-1 Gerrit-Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c Gerrit-Change-Number: 45825 Gerrit-PatchSet: 6 Gerrit-Owner: Bobby R. Bruce Gerrit-Reviewer: Bobby R. Bruce Gerrit-Reviewer: Daniel Carvalho Gerrit-Reviewer: Giacomo Travaglini Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
[gem5-dev] Change in gem5/gem5[minor-release-staging-v21-0-1]: configs: restore_simpoint_checkpoint should be a boolean
Attention is currently required from: Daniel Carvalho, Giacomo Travaglini, Jason Lowe-Power. Hello kokoro, Daniel Carvalho, Giacomo Travaglini, Jason Lowe-Power, I'd like you to do a code review. Please visit https://gem5-review.googlesource.com/c/public/gem5/+/45825 to review the following change. Change subject: configs: restore_simpoint_checkpoint should be a boolean .. configs: restore_simpoint_checkpoint should be a boolean The --restore_simpoint_checkpoint option is a boolean; however if no default value is supplied, optparse sets the default value to None This is not valid for argparse. Argparse recognizes the store_true action and it is automatically treating the option as a boolean, hence providing a default=False instead of default=None Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44765 Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- M configs/common/Options.py M configs/common/Simulation.py 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/common/Options.py b/configs/common/Options.py index c48bfe6..b833531 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -305,6 +305,7 @@ parser.add_option("--take-simpoint-checkpoints", action="store", type="string", help="") parser.add_option("--restore-simpoint-checkpoint", action="store_true", +default=False, help="restore from a simpoint checkpoint taken with " + "--take-simpoint-checkpoints") diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index 067bc01..3b9efc0 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -710,7 +710,7 @@ takeSimpointCheckpoints(simpoints, interval_length, cptdir) # Restore from SimPoint checkpoints -elif options.restore_simpoint_checkpoint != None: +elif options.restore_simpoint_checkpoint: restoreSimpointCheckpoint() else: -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45825 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: minor-release-staging-v21-0-1 Gerrit-Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c Gerrit-Change-Number: 45825 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby R. Bruce Gerrit-Reviewer: Daniel Carvalho Gerrit-Reviewer: Giacomo Travaglini Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-Attention: Daniel Carvalho Gerrit-Attention: Giacomo Travaglini Gerrit-Attention: Jason Lowe-Power Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s