55c55,56
< idleProcess((Addr)-1), themode(kernel), lastModeTick(0)
---
> idleProcess((Addr)-1), themode(kernel), lastModeTick(0),
> iplLast(0), iplLastTick(0)
122a124,152
>
> _iplCount
> .init(32)
> .name(name() + ".ipl_count")
> .desc("number of times we switched to this ipl")
> .flags(total | pdf | nozero | nonan)
> ;
>
> _iplGood
> .init(32)
> .name(name() + ".ipl_good")
> .desc("number of times we switched to this ipl from a different ipl")
> .flags(total | pdf | nozero | nonan)
> ;
>
> _iplTicks
> .init(32)
> .name(name() + ".ipl_ticks")
> .desc("number of cycles we spent at this ipl")
> .flags(total | pdf | nozero | nonan)
> ;
>
> _iplUsed
> .name(name() + ".ipl_used")
> .desc("fraction of swpipl calls that actually changed the ipl")
> .flags(total | nozero | nonan)
> ;
>
> _iplUsed = _iplGood / _iplCount;
186a217,232
> Statistics::swpipl(int ipl)
> {
> assert(ipl >= 0 && ipl <= 0x1f && "invalid IPL\n");
>
> _iplCount[ipl]++;
>
> if (ipl == iplLast)
> return;
>
> _iplGood[ipl]++;
> _iplTicks[iplLast] += curTick() - iplLastTick;
> iplLastTick = curTick();
> iplLast = ipl;
> }
>
> void
193a240,241
> SERIALIZE_SCALAR(iplLast);
> SERIALIZE_SCALAR(iplLastTick);
204a253,254
> UNSERIALIZE_SCALAR(iplLast);
> UNSERIALIZE_SCALAR(iplLastTick);