Make the Event::description() a const function

--HG--
extra : convert_revision : c7768d54d3f78685e93920069f5485083ca989c0
This commit is contained in:
Stephen Hines 2008-02-06 16:32:40 -05:00
parent 0ccf9a2c37
commit 6cc1573923
53 changed files with 76 additions and 74 deletions

View file

@ -577,7 +577,7 @@ MiscRegFile::CP0Event::process()
} }
const char * const char *
MiscRegFile::CP0Event::description() MiscRegFile::CP0Event::description() const
{ {
return "Coprocessor-0 event"; return "Coprocessor-0 event";
} }

View file

@ -139,7 +139,7 @@ namespace MipsISA
virtual void process(); virtual void process();
/** Returns the description of this event. */ /** Returns the description of this event. */
const char *description(); const char *description() const;
/** Schedule This Event */ /** Schedule This Event */
void scheduleEvent(int delay); void scheduleEvent(int delay);

View file

@ -88,7 +88,7 @@ CPUProgressEvent::process()
} }
const char * const char *
CPUProgressEvent::description() CPUProgressEvent::description() const
{ {
return "CPU Progress"; return "CPU Progress";
} }

View file

@ -68,7 +68,7 @@ class CPUProgressEvent : public Event
void process(); void process();
virtual const char *description(); virtual const char *description() const;
}; };
class BaseCPU : public MemObject class BaseCPU : public MemObject

View file

@ -77,7 +77,7 @@ class MemTest : public MemObject
TickEvent(MemTest *c) TickEvent(MemTest *c)
: Event(&mainEventQueue, CPU_Tick_Pri), cpu(c) {} : Event(&mainEventQueue, CPU_Tick_Pri), cpu(c) {}
void process() {cpu->tick();} void process() {cpu->tick();}
virtual const char *description() { return "MemTest tick"; } virtual const char *description() const { return "MemTest tick"; }
}; };
TickEvent tickEvent; TickEvent tickEvent;

View file

@ -97,7 +97,7 @@ class DefaultCommit
TrapEvent(DefaultCommit<Impl> *_commit, unsigned _tid); TrapEvent(DefaultCommit<Impl> *_commit, unsigned _tid);
void process(); void process();
const char *description(); const char *description() const;
}; };
/** Overall commit status. Used to determine if the CPU can deschedule /** Overall commit status. Used to determine if the CPU can deschedule

View file

@ -65,7 +65,7 @@ DefaultCommit<Impl>::TrapEvent::process()
template <class Impl> template <class Impl>
const char * const char *
DefaultCommit<Impl>::TrapEvent::description() DefaultCommit<Impl>::TrapEvent::description() const
{ {
return "Trap"; return "Trap";
} }

View file

@ -80,7 +80,7 @@ FullO3CPU<Impl>::TickEvent::process()
template <class Impl> template <class Impl>
const char * const char *
FullO3CPU<Impl>::TickEvent::description() FullO3CPU<Impl>::TickEvent::description() const
{ {
return "FullO3CPU tick"; return "FullO3CPU tick";
} }
@ -109,7 +109,7 @@ FullO3CPU<Impl>::ActivateThreadEvent::process()
template <class Impl> template <class Impl>
const char * const char *
FullO3CPU<Impl>::ActivateThreadEvent::description() FullO3CPU<Impl>::ActivateThreadEvent::description() const
{ {
return "FullO3CPU \"Activate Thread\""; return "FullO3CPU \"Activate Thread\"";
} }
@ -141,7 +141,7 @@ FullO3CPU<Impl>::DeallocateContextEvent::process()
template <class Impl> template <class Impl>
const char * const char *
FullO3CPU<Impl>::DeallocateContextEvent::description() FullO3CPU<Impl>::DeallocateContextEvent::description() const
{ {
return "FullO3CPU \"Deallocate Context\""; return "FullO3CPU \"Deallocate Context\"";
} }

View file

@ -136,7 +136,7 @@ class FullO3CPU : public BaseO3CPU
/** Processes a tick event, calling tick() on the CPU. */ /** Processes a tick event, calling tick() on the CPU. */
void process(); void process();
/** Returns the description of the tick event. */ /** Returns the description of the tick event. */
const char *description(); const char *description() const;
}; };
/** The tick event used for scheduling CPU ticks. */ /** The tick event used for scheduling CPU ticks. */
@ -178,7 +178,7 @@ class FullO3CPU : public BaseO3CPU
void process(); void process();
/** Returns the description of the event. */ /** Returns the description of the event. */
const char *description(); const char *description() const;
}; };
/** Schedule thread to activate , regardless of its current state. */ /** Schedule thread to activate , regardless of its current state. */
@ -229,7 +229,7 @@ class FullO3CPU : public BaseO3CPU
void setRemove(bool _remove) { remove = _remove; } void setRemove(bool _remove) { remove = _remove; }
/** Returns the description of the event. */ /** Returns the description of the event. */
const char *description(); const char *description() const;
}; };
/** Schedule cpu to deallocate thread context.*/ /** Schedule cpu to deallocate thread context.*/

View file

@ -105,7 +105,7 @@ class InstructionQueue
InstructionQueue<Impl> *iq_ptr); InstructionQueue<Impl> *iq_ptr);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
void setFreeFU() { freeFU = true; } void setFreeFU() { freeFU = true; }
}; };

View file

@ -58,7 +58,7 @@ InstructionQueue<Impl>::FUCompletion::process()
template <class Impl> template <class Impl>
const char * const char *
InstructionQueue<Impl>::FUCompletion::description() InstructionQueue<Impl>::FUCompletion::description() const
{ {
return "Functional unit completion"; return "Functional unit completion";
} }

View file

@ -273,7 +273,7 @@ class LSQUnit {
void process(); void process();
/** Returns the description of this event. */ /** Returns the description of this event. */
const char *description(); const char *description() const;
private: private:
/** Instruction whose results are being written back. */ /** Instruction whose results are being written back. */

View file

@ -67,7 +67,7 @@ LSQUnit<Impl>::WritebackEvent::process()
template<class Impl> template<class Impl>
const char * const char *
LSQUnit<Impl>::WritebackEvent::description() LSQUnit<Impl>::WritebackEvent::description() const
{ {
return "Store writeback"; return "Store writeback";
} }

View file

@ -186,7 +186,7 @@ class BackEnd
/** Processes writeback event. */ /** Processes writeback event. */
virtual void process(); virtual void process();
/** Returns the description of the writeback event. */ /** Returns the description of the writeback event. */
virtual const char *description(); virtual const char *description() const;
}; };
BackEnd(Params *params); BackEnd(Params *params);
@ -309,7 +309,7 @@ class BackEnd
DCacheCompletionEvent(BackEnd *_be); DCacheCompletionEvent(BackEnd *_be);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
}; };
friend class DCacheCompletionEvent; friend class DCacheCompletionEvent;

View file

@ -581,7 +581,7 @@ BackEnd<Impl>::LdWritebackEvent::process()
template<class Impl> template<class Impl>
const char * const char *
BackEnd<Impl>::LdWritebackEvent::description() BackEnd<Impl>::LdWritebackEvent::description() const
{ {
return "Load writeback"; return "Load writeback";
} }
@ -601,7 +601,7 @@ BackEnd<Impl>::DCacheCompletionEvent::process()
template <class Impl> template <class Impl>
const char * const char *
BackEnd<Impl>::DCacheCompletionEvent::description() BackEnd<Impl>::DCacheCompletionEvent::description() const
{ {
return "Cache completion"; return "Cache completion";
} }

View file

@ -306,7 +306,7 @@ class OzoneCPU : public BaseCPU
TickEvent(OzoneCPU *c, int w); TickEvent(OzoneCPU *c, int w);
void process(); void process();
const char *description(); const char *description() const;
}; };
TickEvent tickEvent; TickEvent tickEvent;

View file

@ -82,7 +82,7 @@ OzoneCPU<Impl>::TickEvent::process()
template <class Impl> template <class Impl>
const char * const char *
OzoneCPU<Impl>::TickEvent::description() OzoneCPU<Impl>::TickEvent::description() const
{ {
return "OzoneCPU tick"; return "OzoneCPU tick";
} }

View file

@ -161,7 +161,7 @@ class InorderBackEnd
DCacheCompletionEvent(InorderBackEnd *_be); DCacheCompletionEvent(InorderBackEnd *_be);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
DynInstPtr inst; DynInstPtr inst;
}; };

View file

@ -538,7 +538,7 @@ InorderBackEnd<Impl>::DCacheCompletionEvent::process()
template <class Impl> template <class Impl>
const char * const char *
InorderBackEnd<Impl>::DCacheCompletionEvent::description() InorderBackEnd<Impl>::DCacheCompletionEvent::description() const
{ {
return "DCache completion"; return "DCache completion";
} }

View file

@ -99,7 +99,7 @@ class InstQueue
InstQueue<Impl> *iq_ptr); InstQueue<Impl> *iq_ptr);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
}; };
#endif #endif
/** Constructs an IQ. */ /** Constructs an IQ. */

View file

@ -62,7 +62,7 @@ InstQueue<Impl>::FUCompletion::process()
template <class Impl> template <class Impl>
const char * const char *
InstQueue<Impl>::FUCompletion::description() InstQueue<Impl>::FUCompletion::description() const
{ {
return "Functional unit completion"; return "Functional unit completion";
} }

View file

@ -80,7 +80,7 @@ class OzoneLSQ {
void process(); void process();
/** Returns the description of this event. */ /** Returns the description of this event. */
const char *description(); const char *description() const;
private: private:
/** The store index of the store being written back. */ /** The store index of the store being written back. */

View file

@ -60,7 +60,7 @@ OzoneLSQ<Impl>::StoreCompletionEvent::process()
template <class Impl> template <class Impl>
const char * const char *
OzoneLSQ<Impl>::StoreCompletionEvent::description() OzoneLSQ<Impl>::StoreCompletionEvent::description() const
{ {
return "LSQ store completion"; return "LSQ store completion";
} }

View file

@ -94,7 +94,7 @@ class LWBackEnd
TrapEvent(LWBackEnd<Impl> *_be); TrapEvent(LWBackEnd<Impl> *_be);
void process(); void process();
const char *description(); const char *description() const;
}; };
LWBackEnd(Params *params); LWBackEnd(Params *params);

View file

@ -119,7 +119,7 @@ LWBackEnd<Impl>::TrapEvent::process()
template <class Impl> template <class Impl>
const char * const char *
LWBackEnd<Impl>::TrapEvent::description() LWBackEnd<Impl>::TrapEvent::description() const
{ {
return "Trap"; return "Trap";
} }

View file

@ -329,7 +329,7 @@ class OzoneLWLSQ {
void process(); void process();
/** Returns the description of this event. */ /** Returns the description of this event. */
const char *description(); const char *description() const;
private: private:
/** Instruction whose results are being written back. */ /** Instruction whose results are being written back. */

View file

@ -55,7 +55,7 @@ OzoneLWLSQ<Impl>::WritebackEvent::process()
template<class Impl> template<class Impl>
const char * const char *
OzoneLWLSQ<Impl>::WritebackEvent::description() OzoneLWLSQ<Impl>::WritebackEvent::description() const
{ {
return "Store writeback"; return "Store writeback";
} }

View file

@ -45,7 +45,7 @@ EndQuiesceEvent::process()
} }
const char* const char*
EndQuiesceEvent::description() EndQuiesceEvent::description() const
{ {
return "End Quiesce"; return "End Quiesce";
} }

View file

@ -47,7 +47,7 @@ struct EndQuiesceEvent : public Event
virtual void process(); virtual void process();
/** Event description */ /** Event description */
virtual const char *description(); virtual const char *description() const;
}; };
#endif // __CPU_QUIESCE_EVENT_HH__ #endif // __CPU_QUIESCE_EVENT_HH__

View file

@ -55,7 +55,7 @@ AtomicSimpleCPU::TickEvent::process()
} }
const char * const char *
AtomicSimpleCPU::TickEvent::description() AtomicSimpleCPU::TickEvent::description() const
{ {
return "AtomicSimpleCPU tick"; return "AtomicSimpleCPU tick";
} }

View file

@ -68,7 +68,7 @@ class AtomicSimpleCPU : public BaseSimpleCPU
TickEvent(AtomicSimpleCPU *c); TickEvent(AtomicSimpleCPU *c);
void process(); void process();
const char *description(); const char *description() const;
}; };
TickEvent tickEvent; TickEvent tickEvent;

View file

@ -822,7 +822,7 @@ TimingSimpleCPU::IprEvent::process()
} }
const char * const char *
TimingSimpleCPU::IprEvent::description() TimingSimpleCPU::IprEvent::description() const
{ {
return "Timing Simple CPU Delay IPR event"; return "Timing Simple CPU Delay IPR event";
} }

View file

@ -101,7 +101,7 @@ class TimingSimpleCPU : public BaseSimpleCPU
TickEvent(TimingSimpleCPU *_cpu) TickEvent(TimingSimpleCPU *_cpu)
:Event(&mainEventQueue), cpu(_cpu) {} :Event(&mainEventQueue), cpu(_cpu) {}
const char *description() { return "Timing CPU tick"; } const char *description() const { return "Timing CPU tick"; }
void schedule(PacketPtr _pkt, Tick t); void schedule(PacketPtr _pkt, Tick t);
}; };
@ -127,7 +127,7 @@ class TimingSimpleCPU : public BaseSimpleCPU
ITickEvent(TimingSimpleCPU *_cpu) ITickEvent(TimingSimpleCPU *_cpu)
: TickEvent(_cpu) {} : TickEvent(_cpu) {}
void process(); void process();
const char *description() { return "Timing CPU icache tick"; } const char *description() const { return "Timing CPU icache tick"; }
}; };
ITickEvent tickEvent; ITickEvent tickEvent;
@ -155,7 +155,7 @@ class TimingSimpleCPU : public BaseSimpleCPU
DTickEvent(TimingSimpleCPU *_cpu) DTickEvent(TimingSimpleCPU *_cpu)
: TickEvent(_cpu) {} : TickEvent(_cpu) {}
void process(); void process();
const char *description() { return "Timing CPU dcache tick"; } const char *description() const { return "Timing CPU dcache tick"; }
}; };
DTickEvent tickEvent; DTickEvent tickEvent;
@ -219,7 +219,7 @@ class TimingSimpleCPU : public BaseSimpleCPU
TimingSimpleCPU *cpu; TimingSimpleCPU *cpu;
IprEvent(Packet *_pkt, TimingSimpleCPU *_cpu, Tick t); IprEvent(Packet *_pkt, TimingSimpleCPU *_cpu, Tick t);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
}; };
void completeDrain(); void completeDrain();

View file

@ -204,7 +204,7 @@ OptCPU::TickEvent::process()
} }
const char * const char *
OptCPU::TickEvent::description() OptCPU::TickEvent::description() const
{ {
return "OptCPU tick"; return "OptCPU tick";
} }

View file

@ -81,7 +81,7 @@ class OptCPU : public SimObject
/** /**
* Return a string description of this event. * Return a string description of this event.
*/ */
const char *description(); const char *description() const;
}; };
TickEvent tickEvent; TickEvent tickEvent;

View file

@ -129,7 +129,7 @@ TraceCompleteEvent::process()
} }
const char * const char *
TraceCompleteEvent::description() TraceCompleteEvent::description() const
{ {
return "trace access complete"; return "trace access complete";
} }
@ -146,7 +146,7 @@ TraceCPU::TickEvent::process()
} }
const char * const char *
TraceCPU::TickEvent::description() TraceCPU::TickEvent::description() const
{ {
return "TraceCPU tick"; return "TraceCPU tick";
} }

View file

@ -93,7 +93,7 @@ class TraceCPU : public SimObject
/** /**
* Return a string description of this event. * Return a string description of this event.
*/ */
const char *description(); const char *description() const;
}; };
TickEvent tickEvent; TickEvent tickEvent;
@ -135,7 +135,7 @@ class TraceCompleteEvent : public Event
void process(); void process();
virtual const char *description(); virtual const char *description() const;
}; };
#endif // __CPU_TRACE_TRACE_CPU_HH__ #endif // __CPU_TRACE_TRACE_CPU_HH__

View file

@ -205,7 +205,7 @@ TsunamiIO::RTC::RTCEvent::process()
} }
const char * const char *
TsunamiIO::RTC::RTCEvent::description() TsunamiIO::RTC::RTCEvent::description() const
{ {
return "tsunami RTC interrupt"; return "tsunami RTC interrupt";
} }
@ -429,7 +429,7 @@ TsunamiIO::PITimer::Counter::CounterEvent::process()
} }
const char * const char *
TsunamiIO::PITimer::Counter::CounterEvent::description() TsunamiIO::PITimer::Counter::CounterEvent::description() const
{ {
return "tsunami 8254 Interval timer"; return "tsunami 8254 Interval timer";
} }

View file

@ -73,7 +73,7 @@ class TsunamiIO : public BasicPioDevice
virtual void process(); virtual void process();
/** Event description */ /** Event description */
virtual const char *description(); virtual const char *description() const;
}; };
private: private:
@ -161,7 +161,7 @@ class TsunamiIO : public BasicPioDevice
virtual void process(); virtual void process();
/** Event description */ /** Event description */
virtual const char *description(); virtual const char *description() const;
friend class Counter; friend class Counter;
}; };

View file

@ -62,7 +62,8 @@ class EtherBus : public EtherObject
DoneEvent(EventQueue *q, EtherBus *b) DoneEvent(EventQueue *q, EtherBus *b)
: Event(q), bus(b) {} : Event(q), bus(b) {}
virtual void process() { bus->txDone(); } virtual void process() { bus->txDone(); }
virtual const char *description() { return "ethernet bus completion"; } virtual const char *description() const
{ return "ethernet bus completion"; }
}; };
DoneEvent event; DoneEvent event;

View file

@ -93,7 +93,8 @@ class EtherTap : public EtherObject
TxEvent(EtherTap *_tap) TxEvent(EtherTap *_tap)
: Event(&mainEventQueue), tap(_tap) {} : Event(&mainEventQueue), tap(_tap) {}
void process() { tap->retransmit(); } void process() { tap->retransmit(); }
virtual const char *description() { return "EtherTap retransmit"; } virtual const char *description() const
{ return "EtherTap retransmit"; }
}; };
friend class TxEvent; friend class TxEvent;

View file

@ -208,7 +208,7 @@ MaltaIO::RTC::RTCEvent::process()
} }
const char * const char *
MaltaIO::RTC::RTCEvent::description() MaltaIO::RTC::RTCEvent::description() const
{ {
return "malta RTC interrupt"; return "malta RTC interrupt";
} }
@ -461,7 +461,7 @@ MaltaIO::PITimer::Counter::CounterEvent::process()
} }
const char * const char *
MaltaIO::PITimer::Counter::CounterEvent::description() MaltaIO::PITimer::Counter::CounterEvent::description() const
{ {
return "malta 8254 Interval timer"; return "malta 8254 Interval timer";
} }

View file

@ -79,7 +79,7 @@ class MaltaIO : public BasicPioDevice
virtual void process(); virtual void process();
/** Event description */ /** Event description */
virtual const char *description(); virtual const char *description() const;
}; };
private: private:
@ -171,7 +171,7 @@ class MaltaIO : public BasicPioDevice
virtual void process(); virtual void process();
/** Event description */ /** Event description */
virtual const char *description(); virtual const char *description() const;
friend class Counter; friend class Counter;
}; };

View file

@ -55,7 +55,7 @@ Uart8250::IntrEvent::IntrEvent(Uart8250 *u, int bit)
} }
const char * const char *
Uart8250::IntrEvent::description() Uart8250::IntrEvent::description() const
{ {
return "uart interrupt delay"; return "uart interrupt delay";
} }

View file

@ -82,7 +82,7 @@ class Uart8250 : public Uart
public: public:
IntrEvent(Uart8250 *u, int bit); IntrEvent(Uart8250 *u, int bit);
virtual void process(); virtual void process();
virtual const char *description(); virtual const char *description() const;
void scheduleIntr(); void scheduleIntr();
}; };

View file

@ -150,7 +150,7 @@ class Bridge : public MemObject
virtual void process() { port->trySend(); } virtual void process() { port->trySend(); }
virtual const char *description() { return "bridge send"; } virtual const char *description() const { return "bridge send"; }
}; };
SendEvent sendEvent; SendEvent sendEvent;

View file

@ -105,7 +105,7 @@ void Bus::BusFreeEvent::process()
bus->recvRetry(-1); bus->recvRetry(-1);
} }
const char * Bus::BusFreeEvent::description() const char * Bus::BusFreeEvent::description() const
{ {
return "bus became available"; return "bus became available";
} }

View file

@ -131,7 +131,7 @@ class Bus : public MemObject
public: public:
BusFreeEvent(Bus * _bus); BusFreeEvent(Bus * _bus);
void process(); void process();
const char *description(); const char *description() const;
}; };
/** a globally unique id for this bus. */ /** a globally unique id for this bus. */

View file

@ -63,7 +63,7 @@ class DebugBreakEvent : public Event
DebugBreakEvent(EventQueue *q, Tick _when); DebugBreakEvent(EventQueue *q, Tick _when);
void process(); // process event void process(); // process event
virtual const char *description(); virtual const char *description() const;
}; };
// //
@ -87,7 +87,7 @@ DebugBreakEvent::process()
const char * const char *
DebugBreakEvent::description() DebugBreakEvent::description() const
{ {
return "debug break"; return "debug break";
} }

View file

@ -230,7 +230,7 @@ dumpMainQueue()
const char * const char *
Event::description() Event::description() const
{ {
return "generic"; return "generic";
} }

View file

@ -219,7 +219,7 @@ class Event : public Serializable, public FastAlloc
/// Return a C string describing the event. This string should /// Return a C string describing the event. This string should
/// *not* be dynamically allocated; just a const char array /// *not* be dynamically allocated; just a const char array
/// describing the event class. /// describing the event class.
virtual const char *description(); virtual const char *description() const;
/// Dump the current event data /// Dump the current event data
void dump(); void dump();
@ -280,7 +280,7 @@ DelayFunction(Tick when, T *object)
: Event(&mainEventQueue), object(o) : Event(&mainEventQueue), object(o)
{ setFlags(this->AutoDestroy); schedule(when); } { setFlags(this->AutoDestroy); schedule(when); }
void process() { (object->*F)(); } void process() { (object->*F)(); }
const char *description() { return "delay"; } const char *description() const { return "delay"; }
}; };
new DelayEvent(when, object); new DelayEvent(when, object);

View file

@ -65,7 +65,7 @@ SimLoopExitEvent::process()
const char * const char *
SimLoopExitEvent::description() SimLoopExitEvent::description() const
{ {
return "simulation loop exit"; return "simulation loop exit";
} }
@ -123,7 +123,7 @@ CountedExitEvent::process()
const char * const char *
CountedExitEvent::description() CountedExitEvent::description() const
{ {
return "counted exit"; return "counted exit";
} }
@ -153,7 +153,7 @@ CheckSwapEvent::process()
} }
const char * const char *
CheckSwapEvent::description() CheckSwapEvent::description() const
{ {
return "check swap"; return "check swap";
} }

View file

@ -68,7 +68,7 @@ class SimLoopExitEvent : public Event
void process(); // process event void process(); // process event
virtual const char *description(); virtual const char *description() const;
}; };
class CountedDrainEvent : public SimLoopExitEvent class CountedDrainEvent : public SimLoopExitEvent
@ -104,7 +104,7 @@ class CountedExitEvent : public Event
void process(); // process event void process(); // process event
virtual const char *description(); virtual const char *description() const;
}; };
// //
@ -122,7 +122,7 @@ class CheckSwapEvent : public Event
void process(); // process event void process(); // process event
virtual const char *description(); virtual const char *description() const;
}; };
#endif // __SIM_SIM_EVENTS_HH__ #endif // __SIM_SIM_EVENTS_HH__