ruby: replace global cycle counter w/ cycle per ruby system
Review Request #2901 - Created June 18, 2015 and submitted
| Information | |
|---|---|
| Brandon Potter | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10876:8f73cf051cdd --------------------------- ruby: replace global cycle counter w/ cycle per ruby system
-
src/mem/ruby/system/System.hh (Diff revision 1) -
Rename to start_cycle.
Ship It!
Can you please expand on the commit message? I understand that these changes are to allow multiple RubySystem instances, but some detailed information about this should be available in the commit log.
Overall, it seems like there should be a better way to do this using gem5-principled stats. However, it seems pretty non-trivial to use gem5 stats to handle, for instance, the VC load average stats without significant changes.
Another option, which would clean things up significantly, would be to make start_cycle a private static member of RubySystem and provide a static accessor method. Just like warm-up and cool-down, stats reset is a simulation-wide operation and not system-instance-specific, so there only needs to be one start_cycle variable in the simulation. You're already resetting this variable like a static member, and you've already added the accessor function, so you'd just need to roll-out the RubySystem pointer changes to do it this way. This also removes the need to add parameters to the Throttle.
-
src/mem/ruby/network/Network.cc (Diff revision 2) -
Why does this need to change? If it's for consistency, why did you choose to declare local pointers everywhere and access them through params()? It seems superfluous. Are there forthcoming changes that rely on this convention?
-
src/mem/ruby/network/simple/Throttle.hh (Diff revision 2) -
I don't understand why this is inconsistent with the GarnetNetwork changes: Here, you've added a per-instance pointer to Ruby to achieve the same functionality as with the GarnetNetwork changes, but in the GarnetNetwork, you're accessing the RubySystem from the params() in collateStats.
I'd rather these be consistent.
NOTE: If you were to follow my overall suggestion of making the start_time static in RubySystem, this change would not need to happen, and there would be no consistency issues between here and the GarnetNetwork.
-
src/mem/ruby/network/simple/Throttle.cc (Diff revision 2) -
Why not just use ruby_system as the pointer instead of creating a local pointer, rs?
Diff: |
Revision 3 (+29 -23)
|
|---|
Diff: |
Revision 4 (+30 -23)
|
|---|
Ship It!
