arch-arm: Speedup ARM execution by avoiding expensive RTTI check
getArmSystem is the building block for a lot of ArmSystem getters
a client can use to check for a specific feature.
This method is called very often during simulation and it is basically
casting a System pointer into an ArmSystem pointer.
To do so, it is using dynamic casting to check if the system is really
an ArmSystem. This is very expensive and usually not needed.
The only chance arm code would use a non ArmSystem is when in SE mode.
But if that's the case, we can just replace the assertion with a
assert(FullSystem).
Testing Linux boot with this patch provides a speedup of nearly 2x!
(atomic mode).
This is partially related to:
JIRA: https://gem5.atlassian.net/browse/GEM5-337
Since the PAuth patch changed the purifyTagged helper (on the critical
path of simulation) to rely more heavilly on getArmSystem (via
ArmSystem:: static methods)
Change-Id: Idbf079548ffe03513b4fc58c76f0d69613952a50
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25964
Tested-by: kokoro <noreply+kokoro@google.com>