/*
- * Copyright (c) 2002-2004 The Regents of The University of Michigan
+ * Copyright (c) 2002-2005 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <vector>
#include "base/statistics.hh"
+#include "config/full_system.hh"
#include "cpu/sampler/sampler.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
#include "targetarch/isa_traits.hh"
-#ifdef FULL_SYSTEM
+#if FULL_SYSTEM
class System;
#endif
inline Tick cycles(int numCycles) const { return clock * numCycles; }
inline Tick curCycle() const { return curTick / clock; }
-#ifdef FULL_SYSTEM
+#if FULL_SYSTEM
protected:
uint64_t interrupts[NumInterruptLevels];
uint64_t intstatus;
bool check_interrupts() const { return intstatus != 0; }
uint64_t intr_status() const { return intstatus; }
+
+ class ProfileEvent : public Event
+ {
+ private:
+ BaseCPU *cpu;
+ int interval;
+
+ public:
+ ProfileEvent(BaseCPU *cpu, int interval);
+ void process();
+ };
+ ProfileEvent *profileEvent;
#endif
protected:
Tick clock;
bool functionTrace;
Tick functionTraceStart;
-#ifdef FULL_SYSTEM
+#if FULL_SYSTEM
System *system;
+ int cpu_id;
+ Tick profile;
#endif
+
+ Params();
};
const Params *params;
virtual ~BaseCPU();
virtual void init();
+ virtual void startup();
virtual void regStats();
void registerExecContexts();
*/
EventQueue **comLoadEventQueue;
-#ifdef FULL_SYSTEM
+#if FULL_SYSTEM
System *system;
/**