Author: Armin Rigo <[email protected]>
Branch:
Changeset: r86422:3028b707a5da
Date: 2016-08-22 16:43 +0200
http://bitbucket.org/pypy/pypy/changeset/3028b707a5da/
Log: Merged in timfel/pypy (pull request #473)
If code class for vmprof has attrs, extend that
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
@@ -90,6 +90,9 @@
CodeClass._vmprof_unique_id = 0 # default value: "unknown"
immut = CodeClass.__dict__.get('_immutable_fields_', [])
CodeClass._immutable_fields_ = list(immut) + ['_vmprof_unique_id']
+ attrs = CodeClass.__dict__.get('_attrs_', None)
+ if attrs is not None:
+ CodeClass._attrs_ = list(attrs) + ['_vmprof_unique_id']
self._code_classes.add(CodeClass)
#
class WeakCodeObjectList(RWeakListMixin):
@@ -189,7 +192,7 @@
def decorated_function(*args):
unique_id = get_code_fn(*args)._vmprof_unique_id
- unique_id = rffi.cast(lltype.Signed, unique_id)
+ unique_id = rffi.cast(lltype.Signed, unique_id)
# ^^^ removes the "known non-negative" hint for annotation
if not jit.we_are_jitted():
x = enter_code(unique_id)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit