[pypy-commit] pypy gc-incminimark-pinning: remove debug_* calls

groggi noreply at buildbot.pypy.org
Mon Jun 2 17:24:31 CEST 2014


Author: Gregor Wegberg <code at gregorwegberg.com>
Branch: gc-incminimark-pinning
Changeset: r71845:a18149ea516a
Date: 2014-05-22 17:34 +0200
http://bitbucket.org/pypy/pypy/changeset/a18149ea516a/

Log:	remove debug_* calls

diff --git a/rpython/rtyper/lltypesystem/rffi.py b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -23,9 +23,6 @@
 from rpython.translator.platform import CompilationError
 import os, sys
 
-# XXX remove (groggi)
-from rpython.rlib.debug import debug_print, debug_start, debug_stop
-
 class CConstant(Symbolic):
     """ A C-level constant, maybe #define, rendered directly.
     """
@@ -754,36 +751,25 @@
         """
         # XXX update doc string
 
-        debug_start("groggi-get_nonmovingbuffer")
-        debug_print("data address ", cast_ptr_to_adr(data))
-
         lldata = llstrtype(data)
         count = len(data)
 
         pinned = False
         if rgc.can_move(data):
             if rgc.pin(data):
-                debug_print("raw_and_pinned: len = %s" % count)
                 pinned = True
             else:
-                debug_print("allocating_raw_and_copying: len = %s" % count)
-
                 buf = lltype.malloc(TYPEP.TO, count, flavor='raw')
                 copy_string_to_raw(lldata, buf, 0, count)
-
-                debug_stop("groggi-get_nonmovingbuffer")
                 return buf, pinned, True
                 # ^^^ raw malloc used to get a nonmovable copy
-        else:
-            debug_print("raw_and_nonmovable: len = %s" % count)
-
+        #
         # following code is executed if:
         # - rgc.can_move(data) and rgc.pin(data) both returned true
         # - rgc.can_move(data) returned false
         data_start = cast_ptr_to_adr(lldata) + \
             offsetof(STRTYPE, 'chars') + itemoffsetof(STRTYPE.chars, 0)
 
-        debug_stop("groggi-get_nonmovingbuffer")
         return cast(TYPEP, data_start), pinned, False
         # ^^^ already nonmovable. Therefore it's not raw allocated nor
         # pinned.
@@ -802,9 +788,6 @@
         # followed the 2nd case in get_nonmovingbuffer(); in the first case,
         # 'buf' points to its own raw-malloced memory.
 
-        debug_start("groggi-free_nonmovingbuffer")
-        debug_print("data address ", cast_ptr_to_adr(data))
-
         assert not (is_pinned and is_raw)
 
         if is_pinned:
@@ -813,10 +796,7 @@
             lltype.free(buf, flavor='raw')
         # if is_pinned and is_raw are false: data was already nonmovable,
         # we have nothing to clean up
-
         keepalive_until_here(data)
-
-        debug_stop("groggi-free_nonmovingbuffer")
     free_nonmovingbuffer._annenforceargs_ = [strtype, None, bool, bool]
 
     # int -> (char*, str)


More information about the pypy-commit mailing list