[pypy-commit] pypy vmprof-native: add doc string to jit.oopspec, parameterize native on rvmprof.enable
plan_rich
pypy.commits at gmail.com
Tue Feb 7 04:41:48 EST 2017
Author: Richard Plangger <planrichi at gmail.com>
Branch: vmprof-native
Changeset: r89993:a947b5fb780a
Date: 2017-02-07 10:21 +0100
http://bitbucket.org/pypy/pypy/changeset/a947b5fb780a/
Log: add doc string to jit.oopspec, parameterize native on rvmprof.enable
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -244,6 +244,10 @@
return inner
def oopspec(spec):
+ """ The JIT compiler won't look inside this decorated function,
+ but instead during translation, rewrites it according to the handler in
+ rpython/jit/codewriter/jtransform.py.
+ """
def decorator(func):
func.oopspec = spec
return func
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
@@ -122,7 +122,7 @@
self._gather_all_code_objs = gather_all_code_objs
@jit.dont_look_inside
- def enable(self, fileno, interval, memory=0):
+ def enable(self, fileno, interval, memory=0, native=0):
"""Enable vmprof. Writes go to the given 'fileno'.
The sampling interval is given by 'interval' as a number of
seconds, as a float which must be smaller than 1.0.
@@ -132,8 +132,7 @@
if self.is_enabled:
raise VMProfError("vmprof is already enabled")
- lines = 0
- native = 0
+ lines = 0 # not supported on PyPy currently
p_error = self.cintf.vmprof_init(fileno, interval, lines, memory, "pypy", native)
if p_error:
More information about the pypy-commit
mailing list