mem: Add a requestor ID to each request object.
Review Request #1026 - Created Feb. 4, 2012 and submitted
| Information | |
|---|---|
| Ali Saidi | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
mem: Add a requestor ID to each request object. This change adds a requestor id to each request object which can be used identify every device in the system that is capable of issuing a request. This is part of the way to removing the numCpus+1 stats in the cache and replacing them with the requestor ids. This is one of a series of changes that make way for the stats output to be changed to python.
no stats changes on regression tests
Posted (Feb. 6, 2012, 1:35 a.m.)
-
src/arch/arm/table_walker.hh (Diff revision 1) -
Seems like a typedef for RequestID might be in order. I doubt that it really needs to be a uint32_t. Also, might having a -1 value be useful?
-
src/arch/x86/pagetable_walker.hh (Diff revision 1) -
shouldn't this be a static_cast? We should always know the type. (It could be a safe_cast if you like)
-
src/cpu/testers/rubytest/Check.cc (Diff revision 1) -
What's this?
-
src/mem/request.hh (Diff revision 1) -
Maybe a little comment on what each of these rids are for? writeback, functional, and ????
-
src/mem/request.hh (Diff revision 1) -
These changes are somewhat dangerous because of type conversions. A simple wrapper class for the RequestID would be zero code overhead, yet it would prevent accidents by preventing implicit casts and strange bugs. Just a thought.
Posted (Feb. 7, 2012, 4:49 a.m.)
In general this looks great. I just have a couple of minor concerns:
1. To me "RequestID" would be an ID for a specific request, where "RequesterID" is what you're doing here.
a. So if you're going to make a typedef or struct I'd want it named the latter.
b. Variables, arguments, and functions with "reqId" in the name are ambiguous about whether they're a RequestID or a RequesterID, and I can see that leading to confusion. Unfortunately I don't have any great ideas here. Spelling out requesterID all the time is pretty verbose. What about changing the name to masterID?
2. Is there a way to figure out what ID goes with what object and record that somewhere in the stats file or config.ini, or to assign the IDs a priori in python? I'm concerned that you'll see that requestor 17 is causing problems and have no idea what that is. getReqName() provides a basic hook here but I don't see that it gets called from anywhere.
-
src/sim/system.cc (Diff revision 1) -
Is there (or should there be) a flag that gets set when stats are enabled?
