Author: Richard Plangger <planri...@gmail.com>
Branch: new-jit-log
Changeset: r83969:5e6017560e6b
Date: 2016-04-27 11:15 +0200
http://bitbucket.org/pypy/pypy/changeset/5e6017560e6b/

Log:    added jitlog_disable to the _vmprof module

diff --git a/pypy/module/_vmprof/__init__.py b/pypy/module/_vmprof/__init__.py
--- a/pypy/module/_vmprof/__init__.py
+++ b/pypy/module/_vmprof/__init__.py
@@ -12,6 +12,7 @@
         'enable': 'interp_vmprof.enable',
         'enable_jitlog': 'interp_vmprof.enable_jitlog',
         'disable': 'interp_vmprof.disable',
+        'disable_jitlog': 'interp_vmprof.disable_jitlog',
         'write_all_code_objects': 'interp_vmprof.write_all_code_objects',
         'VMProfError': 'space.fromcache(interp_vmprof.Cache).w_VMProfError',
     }
diff --git a/pypy/module/_vmprof/interp_vmprof.py 
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -77,6 +77,10 @@
     except rvmprof.VMProfError, e:
         raise VMProfError(space, e)
 
+def disable_jitlog(space):
+    """ Disable PyPy's logging facility. """
+    rvmprof.disable_jitlog()
+
 def write_all_code_objects(space):
     """ Needed on cpython, just empty function here
     """
diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py
--- a/rpython/rlib/rvmprof/rvmprof.py
+++ b/rpython/rlib/rvmprof/rvmprof.py
@@ -131,6 +131,9 @@
         blob = jl.assemble_header()
         self.cintf.jitlog_write_marked(jl.MARK_JITLOG_HEADER, blob, len(blob))
 
+    def disable_jitlog(self):
+        self.cintf.jitlog_teardown()
+
     def disable(self):
         """Disable vmprof.
         Raises VMProfError if something goes wrong.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to