Author: fijal
Branch: improve-vmprof-testing
Changeset: r86037:0bcafba73720
Date: 2016-08-05 17:54 +0200
http://bitbucket.org/pypy/pypy/changeset/0bcafba73720/
Log: fight fight until we win
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
@@ -25,6 +25,10 @@
def __str__(self):
return self.msg
+class FakeWeakCodeObjectList(object):
+ def add_handle(self, handle):
+ pass
+
class VMProf(object):
_immutable_fields_ = ['is_enabled?']
@@ -90,6 +94,8 @@
self.initialize()
if self.use_weaklist:
CodeClass._vmprof_weak_list = WeakCodeObjectList()
+ else:
+ CodeClass._vmprof_weak_list = FakeWeakCodeObjectList()
#
def gather_all_code_objs():
all_code_wrefs = CodeClass._vmprof_weak_list.get_all_handles()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit