summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-04-27 19:51:20 -0700
committerGabe Black <gabeblack@google.com>2019-04-30 03:49:40 +0000
commiteea1fb6fc887e523f23cd3141869da59e7047c55 (patch)
tree4b82d9aa743f48c18e9373ffe19254e89012550a /src/cpu/thread_state.hh
parentf9b72476fd948cde713f145834fba81574b0fde0 (diff)
downloadgem5-eea1fb6fc887e523f23cd3141869da59e7047c55.tar.xz
arch: cpu: Track kernel stats using the base ISA agnostic type.
Then cast to the ISA specific type when necessary. This removes (mostly) an ISA specific aspect to some of the interfaces. The ISA specific version of the kernel stats still needs to be constructed and stored in a few places which means that kernel_stats.hh still needs to be a switching arch header, for instance. In the future, I'd like to make the kernel its own object like the Process objects in SE mode, and then it would be able to instantiate and maintain its own stats. Change-Id: I8309d49019124f6bea1482aaea5b5b34e8c97433 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18429 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 574193d0e..200633922 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -41,10 +41,8 @@
class EndQuiesceEvent;
class FunctionProfile;
class ProfileNode;
-namespace TheISA {
- namespace Kernel {
- class Statistics;
- }
+namespace Kernel {
+ class Statistics;
}
class Checkpoint;
@@ -98,7 +96,7 @@ struct ThreadState : public Serializable {
void profileSample();
- TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; }
+ Kernel::Statistics *getKernelStats() { return kernelStats; }
PortProxy &getPhysProxy();
@@ -185,7 +183,7 @@ struct ThreadState : public Serializable {
Addr profilePC;
EndQuiesceEvent *quiesceEvent;
- TheISA::Kernel::Statistics *kernelStats;
+ Kernel::Statistics *kernelStats;
protected:
Process *process;