Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/10301 )
Change subject: sim: Remove trailing dot when assigning a master's name
......................................................................
sim: Remove trailing dot when assigning a master's name
This patch fixes the master's name allocation in the system. The error
was occurring when a submaster was not specified in getMasterId: a
trailing separation dot was still added to the master's name.
Change-Id: I0e67900f6fdd36a61900453b55219fc7007d1b05
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/10301
Reviewed-by: Nikos Nikoleris <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/sim/system.cc
1 file changed, 7 insertions(+), 4 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Andreas Sandberg: Looks good to me, approved
Nikos Nikoleris: Looks good to me, approved
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 911ee5d..74bc94e 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -538,10 +538,13 @@
std::string
System::leafMasterName(const SimObject* master, const std::string&
submaster)
{
- // Get the full master name by appending the submaster name to
- // the root SimObject master name
- auto master_name = master->name() + "." + submaster;
- return master_name;
+ if (submaster.empty()) {
+ return master->name();
+ } else {
+ // Get the full master name by appending the submaster name to
+ // the root SimObject master name
+ return master->name() + "." + submaster;
+ }
}
std::string
--
To view, visit https://gem5-review.googlesource.com/10301
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: I0e67900f6fdd36a61900453b55219fc7007d1b05
Gerrit-Change-Number: 10301
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev