projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a little bit of support to grab info for making graphs
[gem5.git]
/
cpu
/
base.hh
diff --git
a/cpu/base.hh
b/cpu/base.hh
index 9c030be1ca932767c3cbe6e0f7374cabacab449f..4a44ab804ac9e0486cd70c34935df9b9b8894acf 100644
(file)
--- a/
cpu/base.hh
+++ b/
cpu/base.hh
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2002-200
4
The Regents of The University of Michigan
+ * Copyright (c) 2002-200
5
The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-32,12
+32,13
@@
#include <vector>
#include "base/statistics.hh"
#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"
#include "cpu/sampler/sampler.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
#include "targetarch/isa_traits.hh"
-#if
def
FULL_SYSTEM
+#if FULL_SYSTEM
class System;
#endif
class System;
#endif
@@
-55,7
+56,7
@@
class BaseCPU : public SimObject
inline Tick cycles(int numCycles) const { return clock * numCycles; }
inline Tick curCycle() const { return curTick / clock; }
inline Tick cycles(int numCycles) const { return clock * numCycles; }
inline Tick curCycle() const { return curTick / clock; }
-#if
def
FULL_SYSTEM
+#if FULL_SYSTEM
protected:
uint64_t interrupts[NumInterruptLevels];
uint64_t intstatus;
protected:
uint64_t interrupts[NumInterruptLevels];
uint64_t intstatus;
@@
-75,6
+76,18
@@
class BaseCPU : public SimObject
bool check_interrupts() const { return intstatus != 0; }
uint64_t intr_status() const { return 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:
#endif
protected:
@@
-109,9
+122,13
@@
class BaseCPU : public SimObject
Tick clock;
bool functionTrace;
Tick functionTraceStart;
Tick clock;
bool functionTrace;
Tick functionTraceStart;
-#if
def
FULL_SYSTEM
+#if FULL_SYSTEM
System *system;
System *system;
+ int cpu_id;
+ Tick profile;
#endif
#endif
+
+ Params();
};
const Params *params;
};
const Params *params;
@@
-120,6
+137,7
@@
class BaseCPU : public SimObject
virtual ~BaseCPU();
virtual void init();
virtual ~BaseCPU();
virtual void init();
+ virtual void startup();
virtual void regStats();
void registerExecContexts();
virtual void regStats();
void registerExecContexts();
@@
-152,7
+170,7
@@
class BaseCPU : public SimObject
*/
EventQueue **comLoadEventQueue;
*/
EventQueue **comLoadEventQueue;
-#if
def
FULL_SYSTEM
+#if FULL_SYSTEM
System *system;
/**
System *system;
/**