Hello Nikos Nikoleris,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/c/public/gem5/+/27970

to review the following change.


Change subject: configs: Produce list of workload types in workloads.py
......................................................................

configs: Produce list of workload types in workloads.py

Change-Id: I3f585e006704e671775af8d66d241e555d34cb08
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikole...@arm.com>
---
M configs/example/arm/workloads.py
1 file changed, 8 insertions(+), 0 deletions(-)



diff --git a/configs/example/arm/workloads.py b/configs/example/arm/workloads.py
index 61e57f6..dd00819 100644
--- a/configs/example/arm/workloads.py
+++ b/configs/example/arm/workloads.py
@@ -37,6 +37,7 @@
 from __future__ import print_function
 from __future__ import absolute_import

+import inspect
 import m5
 from m5.objects import *
 from m5.options import *
@@ -83,3 +84,10 @@

         # Arm Trusted Firmware will provide a PSCI implementation
         system._have_psci = True
+
+def _is_workload(cls):
+    """ Just a wrapper around the issubclass """
+    return inspect.isclass(cls) and \
+        issubclass(cls, ArmFsWorkload)
+
+workload_types = dict(inspect.getmembers(sys.modules[__name__], _is_workload))

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27970
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: I3f585e006704e671775af8d66d241e555d34cb08
Gerrit-Change-Number: 27970
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to