From eea1fb6fc887e523f23cd3141869da59e7047c55 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 27 Apr 2019 19:51:20 -0700 Subject: 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 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- src/kern/kernel_stats.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kern') diff --git a/src/kern/kernel_stats.hh b/src/kern/kernel_stats.hh index 41071ce08..37dbb9f15 100644 --- a/src/kern/kernel_stats.hh +++ b/src/kern/kernel_stats.hh @@ -53,7 +53,7 @@ class Statistics : public Serializable virtual ~Statistics() {} const std::string name() const { return myname; } - void regStats(const std::string &name); + virtual void regStats(const std::string &name); public: void arm() { _arm++; } -- cgit v1.2.3