From 8ad2b8c5596b817267fbf7a39e6ce28ffb49789c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 31 Oct 2011 02:58:22 -0700 Subject: SE/FS: Make the functions available from the TC consistent between SE and FS. --- src/kern/SConscript | 2 +- src/kern/kernel_stats.cc | 7 +++++-- src/kern/kernel_stats.hh | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/kern') diff --git a/src/kern/SConscript b/src/kern/SConscript index b730e4b49..1726bb3b1 100644 --- a/src/kern/SConscript +++ b/src/kern/SConscript @@ -33,6 +33,7 @@ Import('*') if env['TARGET_ISA'] == 'no': Return() +Source('kernel_stats.cc') Source('linux/events.cc') Source('linux/linux.cc') Source('linux/printk.cc') @@ -50,7 +51,6 @@ DebugFlag('DebugPrintf') DebugFlag('Printf') if env['FULL_SYSTEM']: - Source('kernel_stats.cc') Source('linux/linux_syscalls.cc') if env['TARGET_ISA'] == 'alpha': diff --git a/src/kern/kernel_stats.cc b/src/kern/kernel_stats.cc index 09c1a6760..96e219bd4 100644 --- a/src/kern/kernel_stats.cc +++ b/src/kern/kernel_stats.cc @@ -33,8 +33,10 @@ #include "base/trace.hh" #include "cpu/thread_context.hh" -#include "kern/tru64/tru64_syscalls.hh" #include "kern/kernel_stats.hh" +#if THE_ISA == ALPHA_ISA +#include "kern/tru64/tru64_syscalls.hh" +#endif #include "sim/system.hh" using namespace std; @@ -90,13 +92,14 @@ Statistics::regStats(const string &_name) ; _iplUsed = _iplGood / _iplCount; - +#if THE_ISA == ALPHA_ISA _syscall .init(SystemCalls::Number) .name(name() + ".syscall") .desc("number of syscalls executed") .flags(total | pdf | nozero | nonan) ; +#endif //@todo This needs to get the names of syscalls from an appropriate place. #if 0 diff --git a/src/kern/kernel_stats.hh b/src/kern/kernel_stats.hh index e4ca67fcb..d5abde83f 100644 --- a/src/kern/kernel_stats.hh +++ b/src/kern/kernel_stats.hh @@ -61,7 +61,9 @@ class Statistics : public Serializable Stats::Vector _iplTicks; Stats::Formula _iplUsed; +#if THE_ISA == ALPHA_ISA Stats::Vector _syscall; +#endif // Stats::Vector _faults; private: -- cgit v1.2.3