Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/44765 )

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 <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44765
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M configs/common/Options.py
M configs/common/Simulation.py
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Daniel Carvalho: 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="<simpoint file,weight file,interval-length,warmup-length>")
     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/+/44765
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c
Gerrit-Change-Number: 44765
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
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

Reply via email to