Deleted Added
sdiff udiff text old ( 5336:c7e21f4e5a2e ) new ( 5501:b1beee9351a4 )
full compact
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 <assert.h>
34
35#include <iostream>
36#include <string>
37#include <vector>
38
39#include "cpu/smt.hh"
40#include "base/misc.hh"
41
42#include "sim/eventq.hh"
43#include "base/trace.hh"
44#include "sim/core.hh"
45
46using namespace std;
47
48//
49// Main Event Queue
50//
51// Events on this queue are processed at the *beginning* of each
52// cycle, before the pipeline simulation is performed.

--- 145 unchanged lines hidden (view full) ---

198 paramIn(cp, section, csprintf("event%d", i), eventName);
199
200 // create the event based on its pointer value
201 Serializable::create(cp, eventName);
202 }
203}
204
205void
206EventQueue::dump()
207{
208 cprintf("============================================================\n");
209 cprintf("EventQueue Dump (cycle %d)\n", curTick);
210 cprintf("------------------------------------------------------------\n");
211
212 if (empty())
213 cprintf("<No Events>\n");
214 else {

--- 15 unchanged lines hidden (view full) ---

230
231
232const char *
233Event::description() const
234{
235 return "generic";
236}
237
238#if TRACING_ON
239void
240Event::trace(const char *action)
241{
242 // This DPRINTF is unconditional because calls to this function
243 // are protected by an 'if (DTRACE(Event))' in the inlined Event
244 // methods.
245 //
246 // This is just a default implementation for derived classes where
247 // it's not worth doing anything special. If you want to put a
248 // more informative message in the trace, override this method on
249 // the particular subclass where you have the information that
250 // needs to be printed.
251 DPRINTFN("%s event %s @ %d\n", description(), action, when());
252}
253#endif
254
255void
256Event::dump()
257{
258 cprintf("Event (%s)\n", description());
259 cprintf("Flags: %#x\n", _flags);
260#if TRACING_ON
261 cprintf("Created: %d\n", when_created);
262#endif
263 if (scheduled()) {
264#if TRACING_ON
265 cprintf("Scheduled at %d\n", when_scheduled);
266#endif
267 cprintf("Scheduled for %d, priority %d\n", when(), _priority);
268 }
269 else {
270 cprintf("Not Scheduled\n");
271 }
272}