From a1517867415abe0705d195bbe4cf62cc7fa03e47 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 11 Sep 2015 15:56:09 +0100 Subject: dev: Add an underrun statistic to the HDLCD controller Add a stat that counts buffer underruns in the HDLCD controller. The stat counts at most one underrun per frame since the controller aborts the current frame if it underruns. --- src/dev/arm/hdlcd.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/dev/arm/hdlcd.cc') diff --git a/src/dev/arm/hdlcd.cc b/src/dev/arm/hdlcd.cc index 84df24472..2c402b00a 100644 --- a/src/dev/arm/hdlcd.cc +++ b/src/dev/arm/hdlcd.cc @@ -94,6 +94,18 @@ HDLcd::~HDLcd() { } +void +HDLcd::regStats() +{ + using namespace Stats; + + stats.underruns + .name(name() + ".underruns") + .desc("number of buffer underruns") + .flags(nozero) + ; +} + void HDLcd::serialize(CheckpointOut &cp) const { @@ -503,6 +515,7 @@ void HDLcd::pxlUnderrun() { DPRINTF(HDLcd, "Buffer underrun, stopping DMA fill.\n"); + ++stats.underruns; intRaise(INT_UNDERRUN); dmaEngine->abortFrame(); } -- cgit v1.2.3