diff --git a/DRAMSys/traceAnalyzer/scripts/memUtil.py b/DRAMSys/traceAnalyzer/scripts/memUtil.py index 3779a315..958aa0e1 100755 --- a/DRAMSys/traceAnalyzer/scripts/memUtil.py +++ b/DRAMSys/traceAnalyzer/scripts/memUtil.py @@ -90,3 +90,9 @@ def getMaxRefBurst(connection): cursor.execute(" SELECT MaxRefBurst FROM GeneralInfo ") result = cursor.fetchone() return result[0] + +def getControllerThread(connection): + cursor = connection.cursor() + cursor.execute("SELECT ControllerThread FROM GeneralInfo") + result = cursor.fetchone() + return result[0] diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index 191f6654..a06997af 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -18,8 +18,10 @@ def threadMetric(function): def getThreads(connection): + cthread = getControllerThread(connection) cursor = connection.cursor() - cursor.execute("SELECT DISTINCT(TThread) FROM transactions WHERE TThread != 0 ORDER BY TThread") + query = "SELECT DISTINCT(TThread) FROM transactions WHERE TThread != " + str(cthread) + " ORDER BY TThread" + cursor.execute(query) result = [] for currentRow in cursor: result.append(currentRow[0])