gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eventq.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2000-2005 The Regents of The University of Michigan
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
4  * Copyright (c) 2013 Mark D. Hill and David A. Wood
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met: redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer;
11  * redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution;
14  * neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  * Authors: Steve Reinhardt
31  * Nathan Binkert
32  */
33 
34 /* @file
35  * EventQueue interfaces
36  */
37 
38 #ifndef __SIM_EVENTQ_HH__
39 #define __SIM_EVENTQ_HH__
40 
41 #include <algorithm>
42 #include <cassert>
43 #include <climits>
44 #include <iosfwd>
45 #include <memory>
46 #include <mutex>
47 #include <string>
48 
49 #include "base/flags.hh"
50 #include "base/types.hh"
51 #include "debug/Event.hh"
52 #include "sim/serialize.hh"
53 
54 class EventQueue; // forward declaration
55 class BaseGlobalEvent;
56 
62 extern Tick simQuantum;
63 
65 extern uint32_t numMainEventQueues;
66 
69 
72 
73 extern __thread EventQueue *_curEventQueue;
74 
76 extern bool inParallelMode;
77 
82 EventQueue *getEventQueue(uint32_t index);
83 
86 
92 class EventBase
93 {
94  protected:
95  typedef unsigned short FlagsType;
96  typedef ::Flags<FlagsType> Flags;
97 
98  static const FlagsType PublicRead = 0x003f; // public readable flags
99  static const FlagsType PublicWrite = 0x001d; // public writable flags
100  static const FlagsType Squashed = 0x0001; // has been squashed
101  static const FlagsType Scheduled = 0x0002; // has been scheduled
102  static const FlagsType Managed = 0x0004; // Use life cycle manager
103  static const FlagsType AutoDelete = Managed; // delete after dispatch
109  static const FlagsType Reserved0 = 0x0008;
110  static const FlagsType IsExitEvent = 0x0010; // special exit event
111  static const FlagsType IsMainQueue = 0x0020; // on main event queue
112  static const FlagsType Initialized = 0x7a40; // somewhat random bits
113  static const FlagsType InitMask = 0xffc0; // mask for init bits
114 
115  public:
116  typedef int8_t Priority;
117 
122 
124  static const Priority Minimum_Pri = SCHAR_MIN;
125 
129  static const Priority Debug_Enable_Pri = -101;
130 
134  static const Priority Debug_Break_Pri = -100;
135 
140  static const Priority CPU_Switch_Pri = -31;
141 
145  static const Priority Delayed_Writeback_Pri = -1;
146 
148  static const Priority Default_Pri = 0;
149 
152  static const Priority DVFS_Update_Pri = 31;
153 
157  static const Priority Serialize_Pri = 32;
158 
161  static const Priority CPU_Tick_Pri = 50;
162 
165  static const Priority Stat_Event_Pri = 90;
166 
168  static const Priority Progress_Event_Pri = 95;
169 
172  static const Priority Sim_Exit_Pri = 100;
173 
175  static const Priority Maximum_Pri = SCHAR_MAX;
176 };
177 
178 /*
179  * An item on an event queue. The action caused by a given
180  * event is specified by deriving a subclass and overriding the
181  * process() member function.
182  *
183  * Caution, the order of members is chosen to maximize data packing.
184  */
185 class Event : public EventBase, public Serializable
186 {
187  friend class EventQueue;
188 
189  private:
190  // The event queue is now a linked list of linked lists. The
191  // 'nextBin' pointer is to find the bin, where a bin is defined as
192  // when+priority. All events in the same bin will be stored in a
193  // second linked list (a stack) maintained by the 'nextInBin'
194  // pointer. The list will be accessed in LIFO order. The end
195  // result is that the insert/removal in 'nextBin' is
196  // linear/constant, and the lookup/removal in 'nextInBin' is
197  // constant/constant. Hopefully this is a significant improvement
198  // over the current fully linear insertion.
201 
202  static Event *insertBefore(Event *event, Event *curr);
203  static Event *removeItem(Event *event, Event *last);
204 
208 
209 #ifndef NDEBUG
210  static Counter instanceCounter;
212 
218 
222 #endif
223 
224 #ifdef EVENTQ_DEBUG
225  Tick whenCreated;
226  Tick whenScheduled;
227 #endif
228 
229  void
231  {
232  _when = when;
233 #ifndef NDEBUG
234  queue = q;
235 #endif
236 #ifdef EVENTQ_DEBUG
237  whenScheduled = curTick();
238 #endif
239  }
240 
241  bool
242  initialized() const
243  {
244  return (flags & InitMask) == Initialized;
245  }
246 
247  protected:
249  Flags
250  getFlags() const
251  {
252  return flags & PublicRead;
253  }
254 
255  bool
256  isFlagSet(Flags _flags) const
257  {
258  assert(_flags.noneSet(~PublicRead));
259  return flags.isSet(_flags);
260  }
261 
263  void
264  setFlags(Flags _flags)
265  {
266  assert(_flags.noneSet(~PublicWrite));
267  flags.set(_flags);
268  }
269 
270  void
272  {
273  assert(_flags.noneSet(~PublicWrite));
274  flags.clear(_flags);
275  }
276 
277  void
279  {
281  }
282 
283  // This function isn't really useful if TRACING_ON is not defined
284  virtual void trace(const char *action);
285 
286  protected: /* Memory management */
312  void acquire()
313  {
315  acquireImpl();
316  }
317 
321  void release() {
323  releaseImpl();
324  }
325 
326  virtual void acquireImpl() {}
327 
328  virtual void releaseImpl() {
329  if (!scheduled())
330  delete this;
331  }
332 
335  public:
336 
337  /*
338  * Event constructor
339  * @param queue that the event gets scheduled on
340  */
342  : nextBin(nullptr), nextInBin(nullptr), _when(0), _priority(p),
343  flags(Initialized | f)
344  {
345  assert(f.noneSet(~PublicWrite));
346 #ifndef NDEBUG
348  queue = NULL;
349 #endif
350 #ifdef EVENTQ_DEBUG
351  whenCreated = curTick();
352  whenScheduled = 0;
353 #endif
354  }
355 
356  virtual ~Event();
357  virtual const std::string name() const;
358 
362  virtual const char *description() const;
363 
365  void dump() const;
366 
367  public:
368  /*
369  * This member function is invoked when the event is processed
370  * (occurs). There is no default implementation; each subclass
371  * must provide its own implementation. The event is not
372  * automatically deleted after it is processed (to allow for
373  * statically allocated event objects).
374  *
375  * If the AutoDestroy flag is set, the object is deleted once it
376  * is processed.
377  */
378  virtual void process() = 0;
379 
381  bool scheduled() const { return flags.isSet(Scheduled); }
382 
384  void squash() { flags.set(Squashed); }
385 
387  bool squashed() const { return flags.isSet(Squashed); }
388 
390  bool isExitEvent() const { return flags.isSet(IsExitEvent); }
391 
393  bool isManaged() const { return flags.isSet(Managed); }
394  bool isAutoDelete() const { return isManaged(); }
395 
397  Tick when() const { return _when; }
398 
400  Priority priority() const { return _priority; }
401 
405  virtual BaseGlobalEvent *globalEvent() { return NULL; }
406 
407  void serialize(CheckpointOut &cp) const override;
408  void unserialize(CheckpointIn &cp) override;
409 };
410 
411 inline bool
412 operator<(const Event &l, const Event &r)
413 {
414  return l.when() < r.when() ||
415  (l.when() == r.when() && l.priority() < r.priority());
416 }
417 
418 inline bool
419 operator>(const Event &l, const Event &r)
420 {
421  return l.when() > r.when() ||
422  (l.when() == r.when() && l.priority() > r.priority());
423 }
424 
425 inline bool
426 operator<=(const Event &l, const Event &r)
427 {
428  return l.when() < r.when() ||
429  (l.when() == r.when() && l.priority() <= r.priority());
430 }
431 inline bool
432 operator>=(const Event &l, const Event &r)
433 {
434  return l.when() > r.when() ||
435  (l.when() == r.when() && l.priority() >= r.priority());
436 }
437 
438 inline bool
439 operator==(const Event &l, const Event &r)
440 {
441  return l.when() == r.when() && l.priority() == r.priority();
442 }
443 
444 inline bool
445 operator!=(const Event &l, const Event &r)
446 {
447  return l.when() != r.when() || l.priority() != r.priority();
448 }
449 
489 {
490  private:
491  std::string objName;
494 
496  std::mutex async_queue_mutex;
497 
500 
521  std::mutex service_mutex;
522 
525  void insert(Event *event);
526  void remove(Event *event);
527 
531  void asyncInsert(Event *event);
532 
533  EventQueue(const EventQueue &);
534 
535  public:
547  {
548  public:
550  : new_eq(*_new_eq), old_eq(*curEventQueue())
551  {
552  old_eq.unlock();
553  new_eq.lock();
555  }
556 
558  {
559  new_eq.unlock();
560  old_eq.lock();
562  }
563 
564  private:
567  };
568 
579  {
580  public:
582  : eq(*_eq)
583  {
584  eq.unlock();
585  }
586 
588  {
589  eq.lock();
590  }
591 
592  private:
594  };
595 
596  EventQueue(const std::string &n);
597 
598  virtual const std::string name() const { return objName; }
599  void name(const std::string &st) { objName = st; }
600 
603  void schedule(Event *event, Tick when, bool global = false);
604 
607  void deschedule(Event *event);
608 
611  void reschedule(Event *event, Tick when, bool always = false);
612 
613  Tick nextTick() const { return head->when(); }
614  void setCurTick(Tick newVal) { _curTick = newVal; }
615  Tick getCurTick() const { return _curTick; }
616  Event *getHead() const { return head; }
617 
618  Event *serviceOne();
619 
620  // process all events up to the given timestamp. we inline a
621  // quick test to see if there are any events to process; if so,
622  // call the internal out-of-line version to process them all.
623  void
625  {
626  while (!empty()) {
627  if (nextTick() > when)
628  break;
629 
634  //assert(head->when() >= when && "event scheduled in the past");
635  serviceOne();
636  }
637 
638  setCurTick(when);
639  }
640 
641  // return true if no events are queued
642  bool empty() const { return head == NULL; }
643 
644  void dump() const;
645 
646  bool debugVerify() const;
647 
649  void handleAsyncInsertions();
650 
664  virtual void wakeup(Tick when = (Tick)-1) { }
665 
675 
688  void lock() { service_mutex.lock(); }
689  void unlock() { service_mutex.unlock(); }
704 
705  virtual ~EventQueue() { }
706 };
707 
708 void dumpMainQueue();
709 
711 {
712  protected:
715 
716  public:
720 
721  EventQueue *
722  eventQueue() const
723  {
724  return eventq;
725  }
726 
727  void
729  {
730  eventq->schedule(&event, when);
731  }
732 
733  void
735  {
736  eventq->deschedule(&event);
737  }
738 
739  void
740  reschedule(Event &event, Tick when, bool always = false)
741  {
742  eventq->reschedule(&event, when, always);
743  }
744 
745  void
747  {
748  eventq->schedule(event, when);
749  }
750 
751  void
753  {
754  eventq->deschedule(event);
755  }
756 
757  void
758  reschedule(Event *event, Tick when, bool always = false)
759  {
760  eventq->reschedule(event, when, always);
761  }
762 
763  void wakeupEventQueue(Tick when = (Tick)-1)
764  {
765  eventq->wakeup(when);
766  }
767 
768  void setCurTick(Tick newVal) { eventq->setCurTick(newVal); }
769 };
770 
771 template <class T, void (T::* F)()>
772 void
773 DelayFunction(EventQueue *eventq, Tick when, T *object)
774 {
775  class DelayEvent : public Event
776  {
777  private:
778  T *object;
779 
780  public:
781  DelayEvent(T *o)
782  : Event(Default_Pri, AutoDelete), object(o)
783  { }
784  void process() { (object->*F)(); }
785  const char *description() const { return "delay"; }
786  };
787 
788  eventq->schedule(new DelayEvent(object), when);
789 }
790 
791 template <class T, void (T::* F)()>
792 class EventWrapper : public Event
793 {
794  private:
795  T *object;
796 
797  public:
798  EventWrapper(T *obj, bool del = false, Priority p = Default_Pri)
799  : Event(p), object(obj)
800  {
801  if (del)
803  }
804 
805  EventWrapper(T &obj, bool del = false, Priority p = Default_Pri)
806  : Event(p), object(&obj)
807  {
808  if (del)
810  }
811 
812  void process() { (object->*F)(); }
813 
814  const std::string
815  name() const
816  {
817  return object->name() + ".wrapped_event";
818  }
819 
820  const char *description() const { return "EventWrapped"; }
821 };
822 
823 #endif // __SIM_EVENTQ_HH__
void process()
Definition: eventq.hh:812
EventQueue * eventq
A pointer to this object's event queue.
Definition: eventq.hh:714
virtual ~Event()
Definition: eventq.cc:79
static const Priority Progress_Event_Pri
Progress events come at the end.
Definition: eventq.hh:168
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: eventq.cc:244
Bitfield< 29 > eq
Definition: miscregs.hh:50
Bitfield< 30, 0 > index
uint32_t numMainEventQueues
Current number of allocated main event queues.
Definition: eventq.cc:58
void DelayFunction(EventQueue *eventq, Tick when, T *object)
Definition: eventq.hh:773
void dumpMainQueue()
Definition: eventq.cc:369
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: eventq.cc:253
virtual const std::string name() const
Definition: eventq.cc:86
void deschedule(Event *event)
Deschedule the specified event.
Definition: eventq_impl.hh:69
virtual void acquireImpl()
Definition: eventq.hh:326
static const FlagsType Managed
Definition: eventq.hh:102
Counter instance
This event's unique ID.
Definition: eventq.hh:217
::Flags< FlagsType > Flags
Definition: eventq.hh:96
void asyncInsert(Event *event)
Function for adding events to the async queue.
Definition: eventq.cc:422
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
Definition: eventq.hh:161
bool isFlagSet(Flags _flags) const
Definition: eventq.hh:256
void deschedule(Event *event)
Definition: eventq.hh:752
static const Priority CPU_Switch_Pri
CPU switches schedule the new CPU's tick event for the same cycle (after unscheduling the old CPU's t...
Definition: eventq.hh:140
EventManager(EventManager *em)
Definition: eventq.hh:718
void setCurTick(Tick newVal)
Definition: eventq.hh:614
Tick _when
timestamp when event should be processed
Definition: eventq.hh:205
void schedule(Event *event, Tick when)
Definition: eventq.hh:746
Priority _priority
event priority
Definition: eventq.hh:206
void clear()
Definition: flags.hh:68
int8_t Priority
Definition: eventq.hh:116
Event * nextBin
Definition: eventq.hh:199
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:381
Bitfield< 2 > em
Definition: misc.hh:603
static const Priority Debug_Break_Pri
Breakpoints should happen before anything else (except enabling trace output), so we don't miss any a...
Definition: eventq.hh:134
bool isSet() const
Definition: flags.hh:62
static const FlagsType Initialized
Definition: eventq.hh:112
bool debugVerify() const
Definition: eventq.cc:319
const char * description() const
Return a C string describing the event.
Definition: eventq.hh:820
static Event * insertBefore(Event *event, Event *curr)
Definition: eventq.cc:97
static const FlagsType PublicRead
Definition: eventq.hh:98
EventQueue * getEventQueue(uint32_t index)
Function for returning eventq queue for the provided index.
Definition: eventq.cc:64
void insert(Event *event)
Insert / remove event from the queue.
Definition: eventq.cc:118
bool global
Definition: pagetable.hh:120
void acquire()
Memory management hooks for events that have the Managed flag set.
Definition: eventq.hh:312
virtual void process()=0
void setWhen(Tick when, EventQueue *q)
Definition: eventq.hh:230
void clearFlags()
Definition: eventq.hh:278
STL vector class.
Definition: stl.hh:40
void deschedule(Event &event)
Definition: eventq.hh:734
bool operator>(const Event &l, const Event &r)
Definition: eventq.hh:419
Priority priority() const
Get the event priority.
Definition: eventq.hh:400
unsigned short FlagsType
Definition: eventq.hh:95
static const FlagsType AutoDelete
Definition: eventq.hh:103
EventQueue(const EventQueue &)
Bitfield< 31 > n
Definition: miscregs.hh:1636
Bitfield< 6 > f
Definition: miscregs.hh:1379
virtual void wakeup(Tick when=(Tick)-1)
Function to signal that the event loop should be woken up because an event has been scheduled by an a...
Definition: eventq.hh:664
T * object
Definition: eventq.hh:795
static const FlagsType Squashed
Definition: eventq.hh:100
static const Priority Serialize_Pri
Serailization needs to occur before tick events also, so that a serialize/unserialize is identical to...
Definition: eventq.hh:157
Tick curTick()
The current simulated tick.
Definition: core.hh:47
Temporarily migrate execution to a different event queue.
Definition: eventq.hh:546
Flags flags
Definition: eventq.hh:207
void reschedule(Event *event, Tick when, bool always=false)
Reschedule the specified event.
Definition: eventq_impl.hh:87
bool isAutoDelete() const
Definition: eventq.hh:394
Queue of events sorted in time order.
Definition: eventq.hh:488
Bitfield< 4 > s
Definition: miscregs.hh:1738
std::string objName
Definition: eventq.hh:491
static const FlagsType Scheduled
Definition: eventq.hh:101
const std::string name() const
Definition: eventq.hh:815
Tick when() const
Get the time that the event is scheduled.
Definition: eventq.hh:397
uint64_t Tick
Tick count type.
Definition: types.hh:63
Tick simQuantum
Simulation Quantum for multiple eventq simulation.
Definition: eventq.cc:50
Tick _curTick
Definition: eventq.hh:493
EventWrapper(T *obj, bool del=false, Priority p=Default_Pri)
Definition: eventq.hh:798
Bitfield< 27 > q
Definition: miscregs.hh:1367
virtual BaseGlobalEvent * globalEvent()
If this is part of a GlobalEvent, return the pointer to the Global Event.
Definition: eventq.hh:405
static const Priority Sim_Exit_Pri
If we want to exit on this cycle, it's the very last thing we do.
Definition: eventq.hh:172
void reschedule(Event *event, Tick when, bool always=false)
Definition: eventq.hh:758
EventQueue * curEventQueue()
Definition: eventq.hh:84
Event * nextInBin
Definition: eventq.hh:200
bool squashed() const
Check whether the event is squashed.
Definition: eventq.hh:387
bool operator>=(const Event &l, const Event &r)
Definition: eventq.hh:432
void serviceEvents(Tick when)
Definition: eventq.hh:624
void setFlags(Flags _flags)
Accessor for flags.
Definition: eventq.hh:264
EventManager(EventQueue *eq)
Definition: eventq.hh:719
static const FlagsType Reserved0
This used to be AutoSerialize.
Definition: eventq.hh:109
void setCurTick(Tick newVal)
Definition: eventq.hh:768
void squash()
Squash the current event.
Definition: eventq.hh:384
bool operator<=(const Event &l, const Event &r)
Definition: eventq.hh:426
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
bool initialized() const
Definition: eventq.hh:242
virtual void releaseImpl()
Definition: eventq.hh:328
int64_t Counter
Statistics counter type.
Definition: types.hh:58
EventQueue * eventQueue() const
Definition: eventq.hh:722
bool operator!=(const Event &l, const Event &r)
Definition: eventq.hh:445
std::mutex async_queue_mutex
Mutex to protect async queue.
Definition: eventq.hh:496
Bitfield< 10, 5 > event
std::mutex service_mutex
Lock protecting event handling.
Definition: eventq.hh:521
Basic support for object serialization.
Definition: serialize.hh:220
Event * getHead() const
Definition: eventq.hh:616
void wakeupEventQueue(Tick when=(Tick)-1)
Definition: eventq.hh:763
Tick nextTick() const
Definition: eventq.hh:613
bool inParallelMode
Current mode of execution: parallel / serial.
Definition: eventq.cc:61
void checkpointReschedule(Event *event)
Reschedule an event after a checkpoint.
Definition: eventq.cc:285
bool noneSet() const
Definition: flags.hh:66
Event * replaceHead(Event *s)
function for replacing the head of the event queue, so that a different set of events can run without...
Definition: eventq.cc:361
void clearFlags(Flags _flags)
Definition: eventq.hh:271
Event * head
Definition: eventq.hh:492
void reschedule(Event &event, Tick when, bool always=false)
Definition: eventq.hh:740
void handleAsyncInsertions()
Function for moving events from the async_queue to the main queue.
Definition: eventq.cc:430
Event(Priority p=Default_Pri, Flags f=0)
Definition: eventq.hh:341
void dump() const
Definition: eventq.cc:294
void unlock()
Definition: eventq.hh:689
std::ostream CheckpointOut
Definition: serialize.hh:67
Bitfield< 11 > st
Definition: miscregs.hh:1509
virtual const std::string name() const
Definition: eventq.hh:598
Definition: eventq.hh:185
static Event * removeItem(Event *event, Event *last)
Definition: eventq.cc:141
virtual ~EventQueue()
Definition: eventq.hh:705
bool isExitEvent() const
See if this is a SimExitEvent (without resorting to RTTI)
Definition: eventq.hh:390
virtual void trace(const char *action)
trace event activity
Definition: eventq.cc:384
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
Definition: eventq_impl.hh:42
ScopedRelease(EventQueue *_eq)
Definition: eventq.hh:581
void dump() const
Dump the current event data.
Definition: eventq.cc:399
void schedule(Event &event, Tick when)
Definition: eventq.hh:728
static const Priority Default_Pri
Default is zero for historical reasons.
Definition: eventq.hh:148
Tick getCurTick() const
Definition: eventq.hh:615
static const Priority Minimum_Pri
Event priorities, to provide tie-breakers for events scheduled at the same cycle. ...
Definition: eventq.hh:124
__thread EventQueue * _curEventQueue
The current event queue for the running thread.
Definition: eventq.cc:60
bool isManaged() const
Check whether this event will auto-delete.
Definition: eventq.hh:393
Flags getFlags() const
Accessor for flags.
Definition: eventq.hh:250
void release()
Managed event removed from the event queue.
Definition: eventq.hh:321
static const FlagsType PublicWrite
Definition: eventq.hh:99
void lock()
Provide an interface for locking/unlocking the event queue.
Definition: eventq.hh:688
Common base class for GlobalEvent and GlobalSyncEvent.
Definition: global_event.hh:62
static const Priority DVFS_Update_Pri
DVFS update event leads to stats dump therefore given a lower priority to ensure all relevant states ...
Definition: eventq.hh:152
Common base class for Event and GlobalEvent, so they can share flag and priority definitions and acce...
Definition: eventq.hh:92
ScopedMigration(EventQueue *_new_eq)
Definition: eventq.hh:549
Temporarily release the event queue service lock.
Definition: eventq.hh:578
virtual const char * description() const
Return a C string describing the event.
Definition: eventq.cc:378
void name(const std::string &st)
Definition: eventq.hh:599
Event * serviceOne()
Definition: eventq.cc:204
static const Priority Delayed_Writeback_Pri
For some reason "delayed" inter-cluster writebacks are scheduled before regular writebacks (which hav...
Definition: eventq.hh:145
std::list< Event * > async_queue
List of events added by other threads to this event queue.
Definition: eventq.hh:499
EventWrapper(T &obj, bool del=false, Priority p=Default_Pri)
Definition: eventq.hh:805
std::vector< EventQueue * > mainEventQueue
Array for main event queues.
Definition: eventq.cc:59
Bitfield< 0 > p
static Counter instanceCounter
Global counter to generate unique IDs for Event instances.
Definition: eventq.hh:211
static const Priority Debug_Enable_Pri
If we enable tracing on a particular cycle, do that as the very first thing so we don't miss any of t...
Definition: eventq.hh:129
static const Priority Stat_Event_Pri
Statistics events (dump, reset, etc.) come after everything else, but before exit.
Definition: eventq.hh:165
static const FlagsType IsExitEvent
Definition: eventq.hh:110
void set(Type flags)
Definition: flags.hh:70
Bitfield< 5 > l
bool operator<(const Event &l, const Event &r)
Definition: eventq.hh:412
bool empty() const
Definition: eventq.hh:642
EventQueue * queue
queue to which this event belongs (though it may or may not be scheduled on this queue yet) ...
Definition: eventq.hh:221
EventManager(EventManager &em)
Definition: eventq.hh:717
static const Priority Maximum_Pri
Maximum priority.
Definition: eventq.hh:175
bool operator==(const Event &l, const Event &r)
Definition: eventq.hh:439
static const FlagsType IsMainQueue
Definition: eventq.hh:111
static const FlagsType InitMask
Definition: eventq.hh:113

Generated on Fri Jun 9 2017 13:03:51 for gem5 by doxygen 1.8.6