1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Steve Reinhardt 29 * Nathan Binkert 30 * Steve Raasch 31 */ 32 |
33#include <cassert> |
34#include <iostream> 35#include <string> 36#include <vector> 37 |
38#include "base/misc.hh" |
39#include "base/trace.hh" |
40#include "cpu/smt.hh" |
41#include "sim/core.hh" |
42#include "sim/eventq.hh" |
43 44using namespace std; 45 46// 47// Main Event Queue 48// 49// Events on this queue are processed at the *beginning* of each 50// cycle, before the pipeline simulation is performed. --- 145 unchanged lines hidden (view full) --- 196 paramIn(cp, section, csprintf("event%d", i), eventName); 197 198 // create the event based on its pointer value 199 Serializable::create(cp, eventName); 200 } 201} 202 203void |
204EventQueue::dump() const |
205{ 206 cprintf("============================================================\n"); 207 cprintf("EventQueue Dump (cycle %d)\n", curTick); 208 cprintf("------------------------------------------------------------\n"); 209 210 if (empty()) 211 cprintf("<No Events>\n"); 212 else { --- 15 unchanged lines hidden (view full) --- 228 229 230const char * 231Event::description() const 232{ 233 return "generic"; 234} 235 |
236void 237Event::trace(const char *action) 238{ 239 // This DPRINTF is unconditional because calls to this function 240 // are protected by an 'if (DTRACE(Event))' in the inlined Event 241 // methods. 242 // 243 // This is just a default implementation for derived classes where 244 // it's not worth doing anything special. If you want to put a 245 // more informative message in the trace, override this method on 246 // the particular subclass where you have the information that 247 // needs to be printed. 248 DPRINTFN("%s event %s @ %d\n", description(), action, when()); 249} |
250 251void |
252Event::dump() const |
253{ |
254 cprintf("Event %s (%s)\n", name(), description()); |
255 cprintf("Flags: %#x\n", _flags); |
256#ifdef EVENTQ_DEBUG 257 cprintf("Created: %d\n", whenCreated); |
258#endif 259 if (scheduled()) { |
260#ifdef EVENTQ_DEBUG 261 cprintf("Scheduled at %d\n", whenScheduled); |
262#endif 263 cprintf("Scheduled for %d, priority %d\n", when(), _priority); |
264 } else { |
265 cprintf("Not Scheduled\n"); 266 } 267} |