Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: cpyext-leakchecking
Changeset: r91963:31b9aeebd66e
Date: 2017-07-25 12:03 +0200
http://bitbucket.org/pypy/pypy/changeset/31b9aeebd66e/

Log:    revert debugging code committed by mistake

diff --git a/pypy/interpreter/executioncontext.py 
b/pypy/interpreter/executioncontext.py
--- a/pypy/interpreter/executioncontext.py
+++ b/pypy/interpreter/executioncontext.py
@@ -605,7 +605,6 @@
         e.write_unraisable(space, where, w_obj)
         e.clear(space)   # break up reference cycles
     else:
-        raise
         addrstring = w_obj.getaddrstring(space)
         msg = ("RPython exception %s in %s<%s at 0x%s> ignored\n" % (
                    str(e), where, space.type(w_obj).name, addrstring))
@@ -616,7 +615,7 @@
 def make_finalizer_queue(W_Root, space):
     """Make a FinalizerQueue subclass which responds to GC finalizer
     events by 'firing' the UserDelAction class above.  It does not
-    directly fetches the objects to finalize at all; they stay in the
+    directly fetches the objects to finalize at all; they stay in the 
     GC-managed queue, and will only be fetched by UserDelAction
     (between bytecodes)."""
 
diff --git a/rpython/tool/leakfinder.py b/rpython/tool/leakfinder.py
--- a/rpython/tool/leakfinder.py
+++ b/rpython/tool/leakfinder.py
@@ -6,7 +6,6 @@
 # So far, this is used for lltype.malloc(flavor='raw').
 TRACK_ALLOCATIONS = False
 ALLOCATED = {}
-TB_LINES = 76
 
 class MallocMismatch(Exception):
     def __str__(self):
@@ -14,8 +13,8 @@
         dict2 = {}
         for obj, traceback in dict.items():
             traceback = traceback.splitlines()
-            if len(traceback) > TB_LINES + 2:
-                traceback = ['    ...'] + traceback[-TB_LINES:]
+            if len(traceback) > 8:
+                traceback = ['    ...'] + traceback[-6:]
             traceback = '\n'.join(traceback)
             dict2.setdefault(traceback, [])
             dict2[traceback].append(obj)
@@ -59,7 +58,7 @@
     if TRACK_ALLOCATIONS:
         frame = sys._getframe(framedepth)
         sio = cStringIO.StringIO()
-        traceback.print_stack(frame, limit=40, file=sio)
+        traceback.print_stack(frame, limit=10, file=sio)
         tb = sio.getvalue()
         ALLOCATED[obj] = tb
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to