eventq.cc (5336:c7e21f4e5a2e) eventq.cc (5501:b1beee9351a4)
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
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
33#include <cassert>
35#include <iostream>
36#include <string>
37#include <vector>
38
34#include <iostream>
35#include <string>
36#include <vector>
37
39#include "cpu/smt.hh"
40#include "base/misc.hh"
38#include "base/misc.hh"
41
42#include "sim/eventq.hh"
43#include "base/trace.hh"
39#include "base/trace.hh"
40#include "cpu/smt.hh"
44#include "sim/core.hh"
41#include "sim/core.hh"
42#include "sim/eventq.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
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
206EventQueue::dump()
204EventQueue::dump() const
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
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
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}
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}
253#endif
254
255void
250
251void
256Event::dump()
252Event::dump() const
257{
253{
258 cprintf("Event (%s)\n", description());
254 cprintf("Event %s (%s)\n", name(), description());
259 cprintf("Flags: %#x\n", _flags);
255 cprintf("Flags: %#x\n", _flags);
260#if TRACING_ON
261 cprintf("Created: %d\n", when_created);
256#ifdef EVENTQ_DEBUG
257 cprintf("Created: %d\n", whenCreated);
262#endif
263 if (scheduled()) {
258#endif
259 if (scheduled()) {
264#if TRACING_ON
265 cprintf("Scheduled at %d\n", when_scheduled);
260#ifdef EVENTQ_DEBUG
261 cprintf("Scheduled at %d\n", whenScheduled);
266#endif
267 cprintf("Scheduled for %d, priority %d\n", when(), _priority);
262#endif
263 cprintf("Scheduled for %d, priority %d\n", when(), _priority);
268 }
269 else {
264 } else {
270 cprintf("Not Scheduled\n");
271 }
272}
265 cprintf("Not Scheduled\n");
266 }
267}