[pypy-commit] pypy faster-traceback: work work work

fijal pypy.commits at gmail.com
Fri Mar 25 16:20:35 EDT 2016


Author: fijal
Branch: faster-traceback
Changeset: r83369:13d1a1f6b325
Date: 2016-03-25 22:18 +0200
http://bitbucket.org/pypy/pypy/changeset/13d1a1f6b325/

Log:	work work work

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
@@ -5,7 +5,7 @@
 from pypy.interpreter.baseobjspace import W_Root
 from rpython.rlib import rvmprof
 
-from rpython.rtyper.lltypesystem import lltype
+from rpython.rtyper.lltypesystem import lltype, rffi
 
 
 # ____________________________________________________________
@@ -91,8 +91,8 @@
     MAX_SIZE = 1000
     l = []
 
-    with lltype.scoped_alloc(lltype.Signed, MAX_SIZE) as buf:
-        n = rvmprof._get_vmprof().cintf.get_stack_trace_default(
+    with lltype.scoped_alloc(rffi.CArray(lltype.Signed), MAX_SIZE) as buf:
+        n = rvmprof._get_vmprof().cintf.vmprof_get_stack_trace_default(
             buf, MAX_SIZE)
         for i in range(n):
             l.append(buf[i])
diff --git a/rpython/jit/metainterp/opencoder.py b/rpython/jit/metainterp/opencoder.py
--- a/rpython/jit/metainterp/opencoder.py
+++ b/rpython/jit/metainterp/opencoder.py
@@ -34,9 +34,12 @@
     check_range = False
     # we can move SMALL ints here, if necessary
 
+def get_model(self):
+    return _get_model(self.metainterp_sd)
+
 @specialize.memo()
-def get_model(self):
-    return getattr(self.metainterp_sd, 'opencoder_model', Model)
+def _get_model(metainterp_sd):
+    return getattr(metainterp_sd, 'opencoder_model', Model)
 
 SMALL_INT_STOP  = (2 ** (15 - TAGSHIFT)) - 1
 SMALL_INT_START = -SMALL_INT_STOP # we might want to distribute them uneven
diff --git a/rpython/rlib/rvmprof/cintf.py b/rpython/rlib/rvmprof/cintf.py
--- a/rpython/rlib/rvmprof/cintf.py
+++ b/rpython/rlib/rvmprof/cintf.py
@@ -58,7 +58,7 @@
     vmprof_get_stack_trace_default = rffi.llexternal(
         "vmprof_get_stack_trace_default",
         [rffi.CArrayPtr(lltype.Signed), rffi.INT],
-        rffi.INT, compilation_info=eci, threadsafe=False)
+        rffi.INT, compilation_info=eci, releasegil=False)
     return CInterface(locals())
 
 


More information about the pypy-commit mailing list