From e9ccfaade7345cb7516b0cdb981face0dd6e27d2 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Wed, 2 Dec 2020 10:00:15 +0100 Subject: [PATCH] Added RR and WW Miss --- DRAMSys/traceAnalyzer/scripts/metrics.py | 38 ++++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index 63acdd80..d3ba866b 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -208,10 +208,6 @@ def delayed_reasons(connection): SELECT a.ID AS gapBeginID, b.ID AS gapEndID, - a.Row AS gapBeginRow, - b.Row AS gapEndRow, - a.Bank AS gapBeginBank, - b.Bank AS gapEndBank, a.Command AS gapBeginCommand, b.Command AS gapEndCommand FROM @@ -248,6 +244,34 @@ def delayed_reasons(connection): cursor.execute(query) WR = cursor.fetchone()[0] + # Count RR Miss + query = """ + SELECT + COUNT(*) + FROM delayedDataBusGaps d, Phases p + WHERE + d.gapBeginCommand = "R" AND + d.gapEndCommand = "R" AND + p.Transact = d.gapEndID AND + PhaseName = "ACT"; + """; + cursor.execute(query) + RRM = cursor.fetchone()[0] + + # Count WW Miss + query = """ + SELECT + COUNT(*) + FROM delayedDataBusGaps d, Phases p + WHERE + d.gapBeginCommand = "W" AND + d.gapEndCommand = "W" AND + p.Transact = d.gapEndID AND + PhaseName = "ACT"; + """; + cursor.execute(query) + WWM = cursor.fetchone()[0] + # Count All Gaps query = """ SELECT @@ -256,13 +280,15 @@ def delayed_reasons(connection): """; cursor.execute(query) total = cursor.fetchone()[0] - other = total - RW - WR + other = total - RW - WR - RRM - WWM RW /= total / 100.0 WR /= total / 100.0 + RRM /= total / 100.0 + WWM /= total / 100.0 other /= total / 100.0 - result = "RW: {}, WR: {}, Other: {}".format(RW, WR, other); + result = "RW: {}, WR: {}, RRM: {}, WWM: {}, Other: {}".format(RW, WR, RRM, WWM, other); return result @metric