JIASEN_HUANG has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/39195 )

Change subject: configs: Added list types of replacement policy.
......................................................................

configs: Added list types of replacement policy.

Replacement policy is one of the key points in CPU performance. For ease
of checking the avliable replacment types for any cpu architects,
"replacment policy list" is added in Options.py and ObjectList.py.
Just like Branch Prediction Policies, adding such list would make it efficient for compare cpu performance
regarding different replacment policies especially for Cache.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-853

Change-Id: I97358617038fdcec79fa7e59baba8926284727b4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39195
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M configs/common/ObjectList.py
M configs/common/Options.py
2 files changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  kokoro: Regressions pass



diff --git a/configs/common/ObjectList.py b/configs/common/ObjectList.py
index c91ea0c..82e4df8 100644
--- a/configs/common/ObjectList.py
+++ b/configs/common/ObjectList.py
@@ -162,7 +162,7 @@
             if not key.startswith("Num_"):
                 self._sub_classes[key] = value

-
+rp_list = ObjectList(getattr(m5.objects, 'BaseReplacementPolicy', None))
 bp_list = ObjectList(getattr(m5.objects, 'BranchPredictor', None))
 cpu_list = CPUList(getattr(m5.objects, 'BaseCPU', None))
 hwp_list = ObjectList(getattr(m5.objects, 'BasePrefetcher', None))
diff --git a/configs/common/Options.py b/configs/common/Options.py
index f37b130..d02535f 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -68,6 +68,10 @@
     ObjectList.hwp_list.print()
     sys.exit(0)

+def _listRPTypes(option, opt, value, parser):
+    ObjectList.rp_list.print()
+    sys.exit(0)
+
 def _listIndirectBPTypes(option, opt, value, parser):
     ObjectList.indirect_bp_list.print()
     sys.exit(0)
@@ -186,6 +190,11 @@
     parser.add_option("--indirect-bp-type", type="choice", default=None,
                       choices=ObjectList.indirect_bp_list.get_names(),
help = "type of indirect branch predictor to run with")
+
+    parser.add_option("--list-rp-types",
+                      action="callback", callback=_listRPTypes,
+                      help="List available replacement policy types")
+
     parser.add_option("--list-hwp-types",
                       action="callback", callback=_listHWPTypes,
                       help="List available hardware prefetcher types")

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39195
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: I97358617038fdcec79fa7e59baba8926284727b4
Gerrit-Change-Number: 39195
Gerrit-PatchSet: 7
Gerrit-Owner: Huang Jiasen <[email protected]>
Gerrit-Reviewer: Ayaz Akram <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: JIASEN_HUANG <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to