summaryrefslogtreecommitdiff
path: root/src/dev/arm/hdlcd.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2015-09-11 15:56:09 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2015-09-11 15:56:09 +0100
commita1517867415abe0705d195bbe4cf62cc7fa03e47 (patch)
treec3388a37379ccf1110492f7b451912d0b8644461 /src/dev/arm/hdlcd.cc
parentf7055e9215106fbd8297083298a815ef7098a028 (diff)
downloadgem5-a1517867415abe0705d195bbe4cf62cc7fa03e47.tar.xz
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.
Diffstat (limited to 'src/dev/arm/hdlcd.cc')
-rw-r--r--src/dev/arm/hdlcd.cc13
1 files changed, 13 insertions, 0 deletions
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
@@ -95,6 +95,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
{
DPRINTF(Checkpoint, "Serializing ARM HDLCD\n");
@@ -503,6 +515,7 @@ void
HDLcd::pxlUnderrun()
{
DPRINTF(HDLcd, "Buffer underrun, stopping DMA fill.\n");
+ ++stats.underruns;
intRaise(INT_UNDERRUN);
dmaEngine->abortFrame();
}