[pypy-svn] r27658 - in pypy/branch/njriley-trans/pypy: module/trans rpython rpython/module translator/c translator/c/src
njriley at codespeak.net
njriley at codespeak.net
Wed May 24 20:46:40 CEST 2006
Author: njriley
Date: Wed May 24 20:46:39 2006
New Revision: 27658
Modified:
pypy/branch/njriley-trans/pypy/module/trans/__init__.py
pypy/branch/njriley-trans/pypy/module/trans/interp_trans.py
pypy/branch/njriley-trans/pypy/module/trans/rtrans.py
pypy/branch/njriley-trans/pypy/rpython/extfunctable.py
pypy/branch/njriley-trans/pypy/rpython/module/ll_trans.py
pypy/branch/njriley-trans/pypy/translator/c/extfunc.py
pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h
Log:
Add rtrans/trans.reset_stats so we get more accurate numbers
Modified: pypy/branch/njriley-trans/pypy/module/trans/__init__.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/module/trans/__init__.py (original)
+++ pypy/branch/njriley-trans/pypy/module/trans/__init__.py Wed May 24 20:46:39 2006
@@ -7,11 +7,12 @@
}
interpleveldefs = {
- 'begin' : 'interp_trans.begin',
- 'end' : 'interp_trans.end',
- 'abort' : 'interp_trans.abort',
- 'pause' : 'interp_trans.pause',
- 'unpause' : 'interp_trans.unpause',
- 'verbose' : 'interp_trans.verbose',
- 'is_active' : 'interp_trans.is_active',
+ 'begin' : 'interp_trans.begin',
+ 'end' : 'interp_trans.end',
+ 'abort' : 'interp_trans.abort',
+ 'pause' : 'interp_trans.pause',
+ 'unpause' : 'interp_trans.unpause',
+ 'verbose' : 'interp_trans.verbose',
+ 'is_active' : 'interp_trans.is_active',
+ 'reset_stats' : 'interp_trans.reset_stats',
}
Modified: pypy/branch/njriley-trans/pypy/module/trans/interp_trans.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/module/trans/interp_trans.py (original)
+++ pypy/branch/njriley-trans/pypy/module/trans/interp_trans.py Wed May 24 20:46:39 2006
@@ -28,3 +28,7 @@
def is_active(space):
return space.wrap(rtrans.is_active())
+
+def reset_stats(space):
+ rtrans.reset_stats()
+ return space.w_None
Modified: pypy/branch/njriley-trans/pypy/module/trans/rtrans.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/module/trans/rtrans.py (original)
+++ pypy/branch/njriley-trans/pypy/module/trans/rtrans.py Wed May 24 20:46:39 2006
@@ -29,3 +29,6 @@
def is_active():
os.write(2, '= rtrans.is_active\n')
return False
+
+def reset_stats():
+ os.write(2, '= rtrans.reset_stats\n')
Modified: pypy/branch/njriley-trans/pypy/rpython/extfunctable.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/rpython/extfunctable.py (original)
+++ pypy/branch/njriley-trans/pypy/rpython/extfunctable.py Wed May 24 20:46:39 2006
@@ -277,6 +277,7 @@
declare(rtrans.enable, noneannotation, 'll_trans/enable')
declare(rtrans.disable, noneannotation, 'll_trans/disable')
declare(rtrans.is_active, bool, 'll_trans/is_active')
+declare(rtrans.reset_stats, noneannotation, 'll_trans/reset_stats')
# ___________________________________________________________
# javascript
Modified: pypy/branch/njriley-trans/pypy/rpython/module/ll_trans.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/rpython/module/ll_trans.py (original)
+++ pypy/branch/njriley-trans/pypy/rpython/module/ll_trans.py Wed May 24 20:46:39 2006
@@ -33,3 +33,7 @@
def ll_trans_is_active():
return False
ll_trans_is_active.suggested_primitive = True
+
+def ll_trans_reset_stats():
+ pass
+ll_trans_reset_stats.suggested_primitive = True
Modified: pypy/branch/njriley-trans/pypy/translator/c/extfunc.py
==============================================================================
--- pypy/branch/njriley-trans/pypy/translator/c/extfunc.py (original)
+++ pypy/branch/njriley-trans/pypy/translator/c/extfunc.py Wed May 24 20:46:39 2006
@@ -63,6 +63,7 @@
ll_trans.ll_trans_verbose: 'LL_trans_verbose',
ll_trans.ll_trans_enable: 'LL_trans_enable',
ll_trans.ll_trans_disable: 'LL_trans_disable',
+ ll_trans.ll_trans_reset_stats: 'LL_trans_reset_stats',
ll_trans.ll_trans_is_active: 'LL_trans_is_active',
ll_tsc.ll_tsc_read: 'LL_tsc_read',
ll_tsc.ll_tsc_read_diff: 'LL_tsc_read_diff',
Modified: pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h
==============================================================================
--- pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h (original)
+++ pypy/branch/njriley-trans/pypy/translator/c/src/ll_trans.h Wed May 24 20:46:39 2006
@@ -124,4 +124,10 @@
return ret_val;
}
+void
+LL_trans_reset_stats(void)
+{
+ XACT_DUMP_STATS(2);
+}
+
#endif /* PYPY_NOT_MAIN_FILE */
More information about the Pypy-commit
mailing list