diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-06-22 09:59:13 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-06-22 09:59:13 -0400 |
commit | 91f5736fd3fe989a7d5f3db10070fdedea36e1b4 (patch) | |
tree | fd62e362e7024addd0ec893d4fc9a6d19a12e2f8 /sim/sim_events.hh | |
parent | 1331a723c3113497deb63d0503ab49709d64b0c2 (diff) | |
download | gem5-91f5736fd3fe989a7d5f3db10070fdedea36e1b4.tar.xz |
Move max_time and progress_interval parameters to the Root
object and get rid of the ParamContext that each used to have.
python/m5/objects/Root.py:
Add max_time and progress_interval to the Root object
sim/root.cc:
Add max_time and progress_interval to the Root object. These
parameters used to be in their own contexts in sim_events.cc
sim/sim_events.cc:
Get rid of the ParamContext for max cycles and the progress
event. Move the functionality to the Root object
sim/sim_events.hh:
Move ProgressEvent declaration to the header so that it can
be used in other files.
--HG--
extra : convert_revision : ff664b806855e8eb9201b8a25392aa53204464f0
Diffstat (limited to 'sim/sim_events.hh')
-rw-r--r-- | sim/sim_events.hh | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sim/sim_events.hh b/sim/sim_events.hh index 091d4db61..c93914457 100644 --- a/sim/sim_events.hh +++ b/sim/sim_events.hh @@ -26,8 +26,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __SIM_EVENTS_HH__ -#define __SIM_EVENTS_HH__ +#ifndef __SIM_SIM_EVENTS_HH__ +#define __SIM_SIM_EVENTS_HH__ #include "sim/eventq.hh" @@ -87,7 +87,7 @@ class CountedExitEvent : public Event }; // -// Event to cause a statistics dump +// Event to check swap usage // class CheckSwapEvent : public Event { @@ -97,11 +97,30 @@ class CheckSwapEvent : public Event public: CheckSwapEvent(EventQueue *q, int ival) : Event(q), interval(ival) - { schedule(interval); } + { schedule(curTick + interval); } void process(); // process event virtual const char *description(); }; -#endif // __SIM_EVENTS_HH__ +// +// Progress event: print out cycle every so often so we know we're +// making forward progress. +// +class ProgressEvent : public Event +{ + protected: + Tick interval; + + public: + ProgressEvent(EventQueue *q, Tick ival) + : Event(q), interval(ival) + { schedule(curTick + interval); } + + void process(); // process event + + virtual const char *description(); +}; + +#endif // __SIM_SIM_EVENTS_HH__ |