Faults: Pass the StaticInst involved, if any, to a Fault's invoke method.
Review Request #239 - Created Aug. 31, 2010 and submitted
| Information | |
|---|---|
| Gabe Black | |
| gem5 | |
| Reviewers | |
| Default | |
Faults: Pass the StaticInst involved, if any, to a Fault's invoke method. This review is pretty boring except that I moved the "Fault" type definition into base/types.hh to avoid a header file dependency loop, and the idea that a StaticInstPtr parameter is added to the Fault's invoke method per Steve's suggestion on m5-dev. #includes had to be changed around to avoid circular dependencies among headers and to accommodate "Fault"'s new location.
Posted (Sept. 8, 2010, 1:54 p.m.)
This diff doesn't include the fact that base/types.hh now has the definition of Fault. I would really prefer not to see that go into base/types.hh myself since most things that use base/types.hh could care less about Fault. Perhaps you could explain the #include loop.
-
src/arch/alpha/isa.cc (Diff revision 1) -
<cassert> is the correct include.
-
src/arch/mips/utility.cc (Diff revision 1) -
<cmath> is the correct include.
Posted (Sept. 9, 2010, 6:51 a.m.)
Ok, so part of my problem was that I didn't read the whole diff. I didn't realize that it was split on three pages, so I only read the first page. I didn't get what you were doing with StaticInst. Now that I see what you did to base/types.hh, I like it even less because you suck in ref_cnt.hh. I'd rather see a sim/fault.hh that has the additions that you put into base/types.hh. That said, there are some other options which I've noted on types.hh.
-
src/base/types.hh (Diff revision 1) -
I think you can remove this if you change what's below. I'd still hesitant to see this in base/types.hh, but if we can get rid of the #include, it's not as bad. What about putting this stuff in something like sim/fault.hh?
-
src/base/types.hh (Diff revision 1) -
I think you can forward declare RefCountingPtr like this without the #include: class FaultBase; template <class T> class RefCountingPtr; typedef RefCountingPtr<FaultBase> Fault;
