class FnEvent;
// What does kernel stats expect is included?
class System;
-class Fault;
namespace Kernel {
class Binning
{
- protected:
- typedef TheISA::Addr Addr;
private:
std::string myname;
System *system;
class Statistics : public Serializable
{
- protected:
- typedef TheISA::Addr Addr;
private:
friend class Binning;
Stats::Vector<> _callpal;
Stats::Vector<> _syscall;
- Stats::Vector<> _faults;
+// Stats::Vector<> _faults;
Stats::Vector<> _mode;
Stats::Vector<> _modeGood;
void ivlb() { _ivlb++; }
void ivle() { _ivle++; }
void hwrei() { _hwrei++; }
- void fault(Fault * fault)
+ void fault(Fault fault)
{
- if(fault == NoFault) _faults[0]++;
- else if(fault == MachineCheckFault) _faults[2]++;
- else if(fault == AlignmentFault) _faults[7]++;
- else if(fault == FakeMemFault) _faults[17]++;
- else _faults[fault->id]++;
+ 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);