summaryrefslogtreecommitdiff
path: root/src/python/m5/stats
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-01-27 12:40:01 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-01-27 12:40:01 +0000
commit2974dc7a3771e34542ed5bd1baf88e4ced8cf139 (patch)
treec60e4620b2ac61d0790c07fabdd802b1107a8976 /src/python/m5/stats
parente3875215270220e5142a93848f74ccde9d61b244 (diff)
downloadgem5-2974dc7a3771e34542ed5bd1baf88e4ced8cf139.tar.xz
python: Move native wrappers to the _m5 namespace
Swig wrappers for native objects currently share the _m5.internal name space with Python code. This is undesirable if we ever want to switch from Swig to some other framework for native binding (e.g., PyBind11 or Boost::Python). This changeset moves all of such wrappers to the _m5 namespace, which is now reserved for native code. Change-Id: I2d2bc12dbc05b57b7c5a75f072e08124413d77f3 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/python/m5/stats')
-rw-r--r--src/python/m5/stats/__init__.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/python/m5/stats/__init__.py b/src/python/m5/stats/__init__.py
index f3d394311..56036e040 100644
--- a/src/python/m5/stats/__init__.py
+++ b/src/python/m5/stats/__init__.py
@@ -29,22 +29,22 @@
import m5
-from m5 import internal
+import _m5.stats
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
+from _m5.stats import schedStatEvent as schedEvent
+from _m5.stats import periodicStatDump
outputList = []
def initText(filename, desc=True):
- output = internal.stats.initText(filename, desc)
+ output = _m5.stats.initText(filename, desc)
outputList.append(output)
def initSimStats():
- internal.stats.initSimStats()
- internal.stats.registerPythonStatsHandlers()
+ _m5.stats.initSimStats()
+ _m5.stats.registerPythonStatsHandlers()
names = []
stats_dict = {}
@@ -55,7 +55,7 @@ def enable():
the package is enabled, no more statistics can be created.'''
global stats_list
- stats_list = list(internal.stats.statsList())
+ stats_list = list(_m5.stats.statsList())
for stat in stats_list:
if not stat.check() or not stat.baseCheck():
@@ -75,7 +75,7 @@ def enable():
stats_dict[stat.name] = stat
stat.enable()
- internal.stats.enable();
+ _m5.stats.enable();
def prepare():
'''Prepare all stats for data access. This must be done before
@@ -96,7 +96,7 @@ def dump():
return
lastDump = curTick
- internal.stats.processDumpQueue()
+ _m5.stats.processDumpQueue()
prepare()
@@ -119,7 +119,7 @@ def reset():
for stat in stats_list:
stat.reset()
- internal.stats.processResetQueue()
+ _m5.stats.processResetQueue()
flags = attrdict({
'none' : 0x0000,