Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/10101 )
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 <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/10101
Reviewed-by: Brandon Potter <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/cpu/simple/atomic.cc
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Brandon Potter: Looks good to me, but someone else must approve
Andreas Sandberg: Looks good to me, approved
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: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev