Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/41513 )

Change subject: sim,base-stats: Fix leading "." bug when obtaining requestors
......................................................................

sim,base-stats: Fix leading "." bug when obtaining requestors

When requestor id is requested, it is stripped of the System name via
the `stripSystemName` function in `system.cc`. However, there is a bug
in this code that leaves a leading ".". E.g.:

`system.cpu.mmu.dtb.walker` is stripped to `.cpu.mmu.dtb.walker`.

This patch fixes this issue.

Change-Id: I825cbc60c7f7eaa84c8a0150c30e9f2902cff6cb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41513
Tested-by: kokoro <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
---
M src/sim/system.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/system.cc b/src/sim/system.cc
index 5600542..93902af 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -532,7 +532,7 @@
 System::stripSystemName(const std::string& requestor_name) const
 {
     if (startswith(requestor_name, name())) {
-        return requestor_name.substr(name().size());
+        return requestor_name.substr(name().size() + 1);
     } else {
         return requestor_name;
     }



5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41513
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: I825cbc60c7f7eaa84c8a0150c30e9f2902cff6cb
Gerrit-Change-Number: 41513
Gerrit-PatchSet: 8
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to