diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-04-07 10:42:07 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-04-07 10:42:07 +0100 |
commit | fd52a63e24fe047e1dafc48e5da9b4ce1b086c49 (patch) | |
tree | 65a7eef6c12995b1215ce5b0622da7732fd87cea /src/sim/clocked_object.hh | |
parent | be28d96510e0e722db83b26f1a12d3f5de979b32 (diff) | |
download | gem5-fd52a63e24fe047e1dafc48e5da9b4ce1b086c49.tar.xz |
Revert to 74c1e6513bd0 (sim: Thermal support for Linux)
Diffstat (limited to 'src/sim/clocked_object.hh')
-rw-r--r-- | src/sim/clocked_object.hh | 59 |
1 files changed, 2 insertions, 57 deletions
diff --git a/src/sim/clocked_object.hh b/src/sim/clocked_object.hh index 1ba5ca617..b9a2481ec 100644 --- a/src/sim/clocked_object.hh +++ b/src/sim/clocked_object.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, 2015 ARM Limited + * Copyright (c) 2012-2013 ARM Limited * Copyright (c) 2013 Cornell University * All rights reserved * @@ -37,8 +37,6 @@ * * Authors: Andreas Hansson * Christopher Torng - * Akash Bagdia - * David Guillen Fandos */ /** @@ -49,10 +47,8 @@ #ifndef __SIM_CLOCKED_OBJECT_HH__ #define __SIM_CLOCKED_OBJECT_HH__ -#include "base/callback.hh" #include "base/intmath.hh" #include "base/misc.hh" -#include "enums/PwrState.hh" #include "params/ClockedObject.hh" #include "sim/core.hh" #include "sim/clock_domain.hh" @@ -237,58 +233,7 @@ class ClockedObject { public: ClockedObject(const ClockedObjectParams *p) - : SimObject(p), Clocked(*p->clk_domain), - _currPwrState(p->default_p_state), - prvEvalTick(0) - { } - - /** Parameters of ClockedObject */ - typedef ClockedObjectParams Params; - const Params* params() const - { return reinterpret_cast<const Params*>(_params); } - - void serialize(CheckpointOut &cp) const override; - void unserialize(CheckpointIn &cp) override; - - inline Enums::PwrState pwrState() const - { return _currPwrState; } - - inline std::string pwrStateName() const - { return Enums::PwrStateStrings[_currPwrState]; } - - /** Returns the percentage residency for each power state */ - std::vector<double> pwrStateWeights() const; - - /** - * Record stats values like state residency by computing the time - * difference from previous update. Also, updates the previous - * evaluation tick once all stats are recorded. - * Usually called on power state change and stats dump callback. - */ - void computeStats(); - - void pwrState(Enums::PwrState); - void regStats(); - - protected: - - /** To keep track of the current power state */ - Enums::PwrState _currPwrState; - - Tick prvEvalTick; - - Stats::Scalar numPwrStateTransitions; - Stats::Distribution pwrStateClkGateDist; - Stats::Vector pwrStateResidencyTicks; - -}; - -class ClockedObjectDumpCallback : public Callback -{ - ClockedObject *co; - public: - ClockedObjectDumpCallback(ClockedObject *co_t) : co(co_t) {} - virtual void process() { co->computeStats(); }; + : SimObject(p), Clocked(*p->clk_domain) { } }; #endif //__SIM_CLOCKED_OBJECT_HH__ |