summaryrefslogtreecommitdiff
path: root/src/sim/eventq.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-07-10 21:35:42 -0700
committerNathan Binkert <nate@binkert.org>2008-07-10 21:35:42 -0700
commit93517dd90cf232b779beeebb162984d543e7e33c (patch)
tree256358f26bec2bb8183c6d5a029f09bac5866cee /src/sim/eventq.cc
parent7a83c50a597f73f302ab5fcf372faa35c56a1b06 (diff)
downloadgem5-93517dd90cf232b779beeebb162984d543e7e33c.tar.xz
eventq: Clean up the Event class so that it uses fewer bytes. This
will hopefullly allow it to fit in a cache line.
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r--src/sim/eventq.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 2c679be1e..ab0ba9385 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -30,18 +30,16 @@
* Steve Raasch
*/
-#include <assert.h>
-
+#include <cassert>
#include <iostream>
#include <string>
#include <vector>
-#include "cpu/smt.hh"
#include "base/misc.hh"
-
-#include "sim/eventq.hh"
#include "base/trace.hh"
+#include "cpu/smt.hh"
#include "sim/core.hh"
+#include "sim/eventq.hh"
using namespace std;
@@ -203,7 +201,7 @@ EventQueue::unserialize(Checkpoint *cp, const std::string &section)
}
void
-EventQueue::dump()
+EventQueue::dump() const
{
cprintf("============================================================\n");
cprintf("EventQueue Dump (cycle %d)\n", curTick);
@@ -235,7 +233,6 @@ Event::description() const
return "generic";
}
-#if TRACING_ON
void
Event::trace(const char *action)
{
@@ -250,23 +247,21 @@ Event::trace(const char *action)
// needs to be printed.
DPRINTFN("%s event %s @ %d\n", description(), action, when());
}
-#endif
void
-Event::dump()
+Event::dump() const
{
- cprintf("Event (%s)\n", description());
+ cprintf("Event %s (%s)\n", name(), description());
cprintf("Flags: %#x\n", _flags);
-#if TRACING_ON
- cprintf("Created: %d\n", when_created);
+#ifdef EVENTQ_DEBUG
+ cprintf("Created: %d\n", whenCreated);
#endif
if (scheduled()) {
-#if TRACING_ON
- cprintf("Scheduled at %d\n", when_scheduled);
+#ifdef EVENTQ_DEBUG
+ cprintf("Scheduled at %d\n", whenScheduled);
#endif
cprintf("Scheduled for %d, priority %d\n", when(), _priority);
- }
- else {
+ } else {
cprintf("Not Scheduled\n");
}
}