[Python-checkins] python/dist/src/Tools/scripts combinerefs.py,1.3,1.4
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sat, 19 Apr 2003 11:21:07 -0700
Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv17713/Tools/scripts
Modified Files:
combinerefs.py
Log Message:
Docstring clarifications.
Index: combinerefs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/combinerefs.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** combinerefs.py 18 Apr 2003 19:51:10 -0000 1.3
--- combinerefs.py 19 Apr 2003 18:21:04 -0000 1.4
***************
*** 11,15 ****
After cleaning up everything it can, it prints all remaining live objects
again, but the second time just prints their addresses, refcounts, and type
! names.
Save all this output into a file, then run this script passing the path to
--- 11,16 ----
After cleaning up everything it can, it prints all remaining live objects
again, but the second time just prints their addresses, refcounts, and type
! names (because the interpreter has been torn down, calling repr methods at
! this point can get into infinite loops or blow up).
Save all this output into a file, then run this script passing the path to
***************
*** 37,40 ****
--- 38,47 ----
repr is repr(object), extracted from the first PYTHONDUMPREFS output block.
+ CAUTION: If object is a container type, it may not actually contain all the
+ objects shown in the repr: the repr was captured from the first output block,
+ and some of the containees may have been released since then. For example,
+ it's common for the line showing the dict of interned strings to display
+ strings that no longer exist at the end of Py_Finalize; this can be recognized
+ (albeit painfully) because such containees don't have a line of their own.
The objects are listed in allocation order, with most-recently allocated
***************
*** 58,67 ****
00858028 [1025->1456] str '<dummy key>'
! The string '<dummy key>', which is used in dictobject.c as the name of the
! dummy key that overwrites a real key that gets deleted, actually grew
! several hundred references during cleanup. It suggests that stuff did get
! removed from dicts by cleanup, but that the dicts themselves are staying
! alive for some reason.
! """
import re
--- 65,72 ----
00858028 [1025->1456] str '<dummy key>'
! The string '<dummy key>', which is used in dictobject.c to overwrite a real
! key that gets deleted, grew several hundred references during cleanup. It
! suggests that stuff did get removed from dicts by cleanup, but that the dicts
! themselves are staying alive for some reason. """
import re