changeset 7c95caf53250 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7c95caf53250
description:
python: Export periodicStatDump
Some configuration scripts need periodic stat dumps. One of the ways
this can be achieved is by using the pariodicStatDump helper
function. This function was previously only exported in the internal
name space. Export it as a normal function in m5.stat instead.
Change-Id: Ic88bf1fd33042a62ab436d5944d8ed778264ac98
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Sascha Bischoff <[email protected]>
diffstat:
configs/dram/lat_mem_rd.py | 2 +-
configs/dram/sweep.py | 2 +-
src/python/m5/stats/__init__.py | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r 1c6f1372e487 -r 7c95caf53250 configs/dram/lat_mem_rd.py
--- a/configs/dram/lat_mem_rd.py Mon Dec 19 16:25:38 2016 +0000
+++ b/configs/dram/lat_mem_rd.py Mon Dec 19 16:25:39 2016 +0000
@@ -42,7 +42,7 @@
import m5
from m5.objects import *
from m5.util import addToPath
-from m5.internal.stats import periodicStatDump
+from m5.stats import periodicStatDump
addToPath('../')
from common import MemConfig
diff -r 1c6f1372e487 -r 7c95caf53250 configs/dram/sweep.py
--- a/configs/dram/sweep.py Mon Dec 19 16:25:38 2016 +0000
+++ b/configs/dram/sweep.py Mon Dec 19 16:25:39 2016 +0000
@@ -40,7 +40,7 @@
import m5
from m5.objects import *
from m5.util import addToPath
-from m5.internal.stats import periodicStatDump
+from m5.stats import periodicStatDump
addToPath('../')
diff -r 1c6f1372e487 -r 7c95caf53250 src/python/m5/stats/__init__.py
--- a/src/python/m5/stats/__init__.py Mon Dec 19 16:25:38 2016 +0000
+++ b/src/python/m5/stats/__init__.py Mon Dec 19 16:25:39 2016 +0000
@@ -30,10 +30,13 @@
import m5
from m5 import internal
-from m5.internal.stats import schedStatEvent as schedEvent
from m5.objects import Root
from m5.util import attrdict, fatal
+# Stat exports
+from m5.internal.stats import schedStatEvent as schedEvent
+from m5.internal.stats import periodicStatDump
+
outputList = []
def initText(filename, desc=True):
output = internal.stats.initText(filename, desc)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev