Hello Andreas Sandberg,

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

    https://gem5-review.googlesource.com/10101

to review the following change.


Change subject: cpu: Avoid unnecessary dynamic_pointer_cast in atomic model
......................................................................

cpu: Avoid unnecessary dynamic_pointer_cast in atomic model

In the atomic model a dynamic_pointer_cast is performed at every tick to
check if the fault is a SyscallRetryFault. This was happening even when
there was no generated fault.

Change-Id: I7f4afeffffdf4f988230e05286602d8d9a919c6c
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/cpu/simple/atomic.cc
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index bc7670b..7a368ab 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -628,7 +628,8 @@
                     traceData = NULL;
                 }

-                if (dynamic_pointer_cast<SyscallRetryFault>(fault)) {
+                if (fault != NoFault &&
+                    dynamic_pointer_cast<SyscallRetryFault>(fault)) {
                     // Retry execution of system calls after a delay.
// Prevents immediate re-execution since conditions which
                     // caused the retry are unlikely to change every tick.

--
To view, visit https://gem5-review.googlesource.com/10101
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7f4afeffffdf4f988230e05286602d8d9a919c6c
Gerrit-Change-Number: 10101
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to