Moved the switched version of kernel_stats.hh back to kern, and moved the base kernel_stats to base_kernel_stats
--HG-- extra : convert_revision : 2a010d2eb7ea2586ff063b99b8bcde6eb1e8e017
This commit is contained in:
@@ -37,8 +37,10 @@
|
||||
#include "cpu/thread_context.hh"
|
||||
|
||||
class EndQuiesceEvent;
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -91,7 +93,8 @@ class CheckerThreadContext : public ThreadContext
|
||||
|
||||
TheISA::DTB *getDTBPtr() { return actualTC->getDTBPtr(); }
|
||||
|
||||
Kernel::Statistics *getKernelStats() { return actualTC->getKernelStats(); }
|
||||
TheISA::Kernel::Statistics *getKernelStats()
|
||||
{ return actualTC->getKernelStats(); }
|
||||
|
||||
FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); }
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class O3ThreadContext : public ThreadContext
|
||||
virtual PhysicalMemory *getPhysMemPtr() { return cpu->physmem; }
|
||||
|
||||
/** Returns a pointer to this thread's kernel statistics. */
|
||||
virtual Kernel::Statistics *getKernelStats()
|
||||
virtual TheISA::Kernel::Statistics *getKernelStats()
|
||||
{ return thread->kernelStats; }
|
||||
|
||||
virtual FunctionalPort *getPhysPort() { return thread->getPhysPort(); }
|
||||
|
||||
@@ -194,7 +194,7 @@ void
|
||||
O3ThreadContext<Impl>::regStats(const std::string &name)
|
||||
{
|
||||
#if FULL_SYSTEM
|
||||
thread->kernelStats = new Kernel::Statistics(cpu->system);
|
||||
thread->kernelStats = new TheISA::Kernel::Statistics(cpu->system);
|
||||
thread->kernelStats->regStats(name + ".kern");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -62,8 +62,10 @@ class MemoryController;
|
||||
class RemoteGDB;
|
||||
class GDBListener;
|
||||
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
};
|
||||
|
||||
#else
|
||||
@@ -127,7 +129,7 @@ class OzoneCPU : public BaseCPU
|
||||
|
||||
TheISA::DTB * getDTBPtr() { return cpu->dtb; }
|
||||
|
||||
Kernel::Statistics *getKernelStats()
|
||||
TheISA::Kernel::Statistics *getKernelStats()
|
||||
{ return thread->getKernelStats(); }
|
||||
|
||||
FunctionalPort *getPhysPort() { return thread->getPhysPort(); }
|
||||
|
||||
@@ -891,7 +891,7 @@ void
|
||||
OzoneCPU<Impl>::OzoneTC::regStats(const std::string &name)
|
||||
{
|
||||
#if FULL_SYSTEM
|
||||
thread->kernelStats = new Kernel::Statistics(cpu->system);
|
||||
thread->kernelStats = new TheISA::Kernel::Statistics(cpu->system);
|
||||
thread->kernelStats->regStats(name + ".kern");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
|
||||
profilePC = 3;
|
||||
|
||||
if (use_kernel_stats) {
|
||||
kernelStats = new Kernel::Statistics(system);
|
||||
kernelStats = new TheISA::Kernel::Statistics(system);
|
||||
} else {
|
||||
kernelStats = NULL;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ SimpleThread::takeOverFrom(ThreadContext *oldContext)
|
||||
quiesceEvent->tc = tc;
|
||||
}
|
||||
|
||||
Kernel::Statistics *stats = oldContext->getKernelStats();
|
||||
TheISA::Kernel::Statistics *stats = oldContext->getKernelStats();
|
||||
if (stats) {
|
||||
kernelStats = stats;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ SimpleThread::copyTC(ThreadContext *context)
|
||||
if (quiesce) {
|
||||
quiesceEvent = quiesce;
|
||||
}
|
||||
Kernel::Statistics *stats = context->getKernelStats();
|
||||
TheISA::Kernel::Statistics *stats = context->getKernelStats();
|
||||
if (stats) {
|
||||
kernelStats = stats;
|
||||
}
|
||||
|
||||
@@ -55,8 +55,10 @@ class ProfileNode;
|
||||
class FunctionalPort;
|
||||
class PhysicalPort;
|
||||
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
};
|
||||
|
||||
#else // !FULL_SYSTEM
|
||||
|
||||
@@ -56,8 +56,10 @@ class FunctionalPort;
|
||||
class VirtualPort;
|
||||
class Process;
|
||||
class System;
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -124,7 +126,7 @@ class ThreadContext
|
||||
|
||||
virtual TheISA::DTB *getDTBPtr() = 0;
|
||||
|
||||
virtual Kernel::Statistics *getKernelStats() = 0;
|
||||
virtual TheISA::Kernel::Statistics *getKernelStats() = 0;
|
||||
|
||||
virtual FunctionalPort *getPhysPort() = 0;
|
||||
|
||||
@@ -295,7 +297,8 @@ class ProxyThreadContext : public ThreadContext
|
||||
|
||||
TheISA::DTB *getDTBPtr() { return actualTC->getDTBPtr(); }
|
||||
|
||||
Kernel::Statistics *getKernelStats() { return actualTC->getKernelStats(); }
|
||||
TheISA::Kernel::Statistics *getKernelStats()
|
||||
{ return actualTC->getKernelStats(); }
|
||||
|
||||
FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); }
|
||||
|
||||
|
||||
@@ -44,8 +44,10 @@
|
||||
class EndQuiesceEvent;
|
||||
class FunctionProfile;
|
||||
class ProfileNode;
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -97,7 +99,7 @@ struct ThreadState {
|
||||
|
||||
void profileSample();
|
||||
|
||||
Kernel::Statistics *getKernelStats() { return kernelStats; }
|
||||
TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; }
|
||||
|
||||
FunctionalPort *getPhysPort() { return physPort; }
|
||||
|
||||
@@ -187,7 +189,7 @@ struct ThreadState {
|
||||
Addr profilePC;
|
||||
EndQuiesceEvent *quiesceEvent;
|
||||
|
||||
Kernel::Statistics *kernelStats;
|
||||
TheISA::Kernel::Statistics *kernelStats;
|
||||
protected:
|
||||
/** A functional port outgoing only for functional accesses to physical
|
||||
* addresses.*/
|
||||
|
||||
Reference in New Issue
Block a user