From b5111285078cf790a2330c725b63fbc1f791db14 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 7 Mar 2006 04:31:38 -0500 Subject: Some clean up work with faults. arch/alpha/faults.cc: Renamed the _stat stat to a more descriptive _count, got rid of some old commented out code, and moved common fault handling code, ie recording that the fault happend and that it wasn't mispeculated, into the FaultBase class. arch/alpha/faults.hh: Renamed the _stat stat to the more descriptive _count, and renamed the appropriate accessor functions. kern/kernel_stats.cc: kern/kernel_stats.hh: The fault statistics are now handled by the fault classes themselves. sim/faults.cc: The default implementation of the "invoke" method now does what all faults should do first, ie record that the fault happened, and make sure the fault isn't being executed on a mispeculated execution path. sim/faults.hh: There is now a default implementation of invoke, and the stat function is taken care of in the architecture specific fault classes. --HG-- extra : convert_revision : f6656fbea991df9addf85cad740ac37b1036b71a --- kern/kernel_stats.cc | 13 ------------- kern/kernel_stats.hh | 5 ----- 2 files changed, 18 deletions(-) (limited to 'kern') diff --git a/kern/kernel_stats.cc b/kern/kernel_stats.cc index 33485ca15..f898dad94 100644 --- a/kern/kernel_stats.cc +++ b/kern/kernel_stats.cc @@ -136,19 +136,6 @@ Statistics::regStats(const string &_name) } } -/* _faults - .init(NumFaults) - .name(name() + ".faults") - .desc("number of faults") - .flags(total | pdf | nozero | nonan) - ; - - for (int i = 1; i < NumFaults; ++i) { - const char *str = (*ListOfFaults[i])->name; - if (str) - _faults.subname(i, str); - }*/ - _mode .init(cpu_mode_num) .name(name() + ".mode_switch") diff --git a/kern/kernel_stats.hh b/kern/kernel_stats.hh index 4896a0705..830bfe09d 100644 --- a/kern/kernel_stats.hh +++ b/kern/kernel_stats.hh @@ -176,11 +176,6 @@ class Statistics : public Serializable void ivlb() { _ivlb++; } void ivle() { _ivle++; } void hwrei() { _hwrei++; } - void fault(Fault fault) - { - if(fault != NoFault) - fault->stat()++; - }// FIXME: When there are no generic system fault objects, this will go back to _faults[fault]++; } void swpipl(int ipl); void mode(cpu_mode newmode); void context(Addr oldpcbb, Addr newpcbb); -- cgit v1.2.3