ruby: Fix double statistic registration in garnet
Review Request #3539 - Created June 29, 2016 and submitted
| Information | |
|---|---|
| Matthew Poremba | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11549:983f44e21307 --------------------------- ruby: Fix double statistic registration in garnet Currently garnet will not run due to double statistic registration of new stats in ClockedObject. This occurs because a temporary array named 'cls' is being added as a child to garnet internal and external link SimObjects. This patch simply renames the temporary array which prevents it from being added as a child object and avoids the assertion that a statistic was already registered.
Garnet runs with patch applied.
Posted (June 29, 2016, 10:28 a.m.)
Hi all. Garnet has been broken for three weeks now, so it would be nice to push this simple change as soon as possible.
Posted (June 29, 2016, 11:09 a.m.)
I don't understand why adding an 'r' to the variable name fixed this issue.
I think the normal way to deal with local variables that you don't want added as a child to the SimObject is to prepend an underscore to their name (e.g.,
_cls).On a side note, we really need better test coverage if errors like this keep getting checked in!
Review request changed
Updated (June 29, 2016, 1:21 p.m.)
Change Summary:
Change renamed variable to _cls. Also rename nearby nls -> _nls for consistency in this file.
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+18 -16) |
Ship It!
Ship It!
