diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-02-16 01:25:48 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-02-16 01:25:48 -0500 |
commit | b161d2a731ec7d75bdeb896d1b89efcbb125a09f (patch) | |
tree | a1a92378afb4d05e8c9e2d047c1c9edbcc9e3447 /kern/kernel_stats.hh | |
parent | 7f17f1f2df7dc7123448ec624a345ee7c0e996b5 (diff) | |
parent | 10c79efe556697ebbed74c82214b5505b405da5b (diff) | |
download | gem5-b161d2a731ec7d75bdeb896d1b89efcbb125a09f.tar.xz |
Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into ewok.(none):/home/gblack/m5/multiarch
--HG--
extra : convert_revision : d8626acb2686e123ad0bb6cf94e85c992657470d
Diffstat (limited to 'kern/kernel_stats.hh')
-rw-r--r-- | kern/kernel_stats.hh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kern/kernel_stats.hh b/kern/kernel_stats.hh index 62dd84a28..98cc044ac 100644 --- a/kern/kernel_stats.hh +++ b/kern/kernel_stats.hh @@ -41,7 +41,7 @@ class ExecContext; class FnEvent; // What does kernel stats expect is included? class System; -enum Fault; +class Fault; namespace Kernel { @@ -176,7 +176,14 @@ class Statistics : public Serializable void ivlb() { _ivlb++; } void ivle() { _ivle++; } void hwrei() { _hwrei++; } - void fault(Fault fault) { _faults[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]++; + }// 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); |