Various cleanup. Mostly forcing initialization of some fields...

I noticed that checkpoints dumped from m5.debug and m5.opt had
differences, which is no longer the case (other than addresses
encoded in names).

cpu/full_cpu/smt.hh:
    Get rid of unused SMT_MAX_CPUS.
sim/debug.cc:
    Use AutoDelete for DebugBreakEvent.
sim/serialize.cc:
sim/serialize.hh:
    Move constructor & destructor to header so they can be inlined.

--HG--
extra : convert_revision : bc68c2c9b053b1de0d655ed555734419fafd0b83
This commit is contained in:
Steve Reinhardt 2003-12-06 09:57:59 -08:00
parent b6c77fe6f8
commit 37a718e45e
4 changed files with 4 additions and 16 deletions

View file

@ -28,17 +28,12 @@
/**
* @file
* Defines SMT_MAX_CPUS and SMT_MAX_THREADS.
* Defines SMT_MAX_THREADS.
*/
#ifndef __SMT_HH__
#define __SMT_HH__
#ifndef SMT_MAX_CPUS
/** The maximum number of cpus in any one system. */
#define SMT_MAX_CPUS 4
#endif
#ifndef SMT_MAX_THREADS
/** The number of TPUs in any processor. */
#define SMT_MAX_THREADS 4

View file

@ -66,6 +66,7 @@ class DebugBreakEvent : public Event
DebugBreakEvent::DebugBreakEvent(EventQueue *q, Tick _when)
: Event(q)
{
setFlags(AutoDelete);
schedule(_when, -20000);
}
@ -76,7 +77,6 @@ void
DebugBreakEvent::process()
{
debug_break();
delete this;
}

View file

@ -50,13 +50,6 @@ using namespace std;
Serializer *Serializeable::serializer = NULL;
Serializeable::Serializeable()
: serialized(false)
{ }
Serializeable::~Serializeable()
{ }
void
Serializeable::mark()
{

View file

@ -115,8 +115,8 @@ class Serializeable
void nameOut(std::ostream& os, const std::string &_name);
public:
Serializeable();
virtual ~Serializeable();
Serializeable() : serialized(false) {}
virtual ~Serializeable() {}
// manditory virtual function, so objects must provide names
virtual std::string name() const = 0;