Hello Richard Cooper, Nikos Nikoleris,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/32776
to review the following change.
Change subject: arch-arm: Early checking if debug is enabled in TLB
......................................................................
arch-arm: Early checking if debug is enabled in TLB
The patch is aiming at speeding up gem5 execution. The TLB::translateFs
is in the critical path of the simulator: every fetch + ld/st will make
use of it.
Checking all the time for a breakpoint during fetch is rather expensive;
it is better to make use of the cached booleans in SelfDebug to do an
early check to see if any of
Watchpoint/Breakpopint/VectorCatch/SoftwareStep is enabled.
Most workloads won't use them so there's no point on calling the
testDebug method
Change-Id: I0189b84e0dc2e081acce04ff44787b9f1014477c
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Richard Cooper <richard.coo...@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikole...@arm.com>
---
M src/arch/arm/tlb.cc
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
index e8bb718..28534ee 100644
--- a/src/arch/arm/tlb.cc
+++ b/src/arch/arm/tlb.cc
@@ -1233,10 +1233,10 @@
functional, vaddr, tranMethod);
}
- //Check for Debug Exceptions
- if (fault == NoFault) {
- SelfDebug *sd = ArmISA::ISA::getSelfDebug(tc);
+ // Check for Debug Exceptions
+ SelfDebug *sd = ArmISA::ISA::getSelfDebug(tc);
+ if (sd->enabled() && fault == NoFault) {
fault = sd->testDebug(tc, req, mode);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32776
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: I0189b84e0dc2e081acce04ff44787b9f1014477c
Gerrit-Change-Number: 32776
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-Reviewer: Richard Cooper <richard.coo...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s