Cyclops 0.9.4
Greg Ewing
greg.ewing at compaq.com
Sun Jul 25 17:24:42 EDT 1999
Tim Peters wrote:
>
> Nobody can sift thru hundreds of thousands of live objects by eye, which
> happens routinely in large long-running apps.
I can look for certain kinds of object, though. If
I open ten BlargWindows and then close them, I know
there shouldn't be any BlargWindow instances left.
If there are, I can take a closer look at them to
find out what what's happening.
> Well, 100,000 objects can often be reached in 500,000 ways via one direct
> link -- & it gets messier the longer the path length you consider. You have
> to reduce the set of objects that are potentially interesting; Cyclops
> requires you to identify them in advance; I'm not sure how it could be
> easier to identify them later.
I'm not asking to be told about every possible way
of reaching every live object, obviously! What I mean
is, once I've found (by whatever means) a live object that
I know should be dead, I should be able to say "show me
a path from the root set to this object". I don't need all
paths, only one of them -- somewhere along that path there
will be a link that shouldn't be there, and it should be
fairly easy to spot.
That's what I meant when I said that cycles aren't what
I want to know about in that situation.
> All objects ever allocated, or all objects whose refcounts haven't yet
> fallen to 0?
The latter.
> Since
> "even ints are boxed" in Python, that's a major memory hit.
Which is why I'm happy for it to be a debugging option,
maybe requiring a different interpreter. Although if M&S
is ever added, we're going to have to live with this
overhead all the time -- or find a smarter way to handle
it.
> Let's say you have everything you
> want, and even more: for every object ever allocated, Cyclops2 can give you
> a timestamped history of every change ever made to it, every path from which
> it could be reached at any given time, and similarly for every object
> reachable from it.
Tim, this is expandio ad absurdum! I never asked for all that
information. All I said whas that it would be handy to have a way
to discover the existence of dead objects taking up room in
my heap. I never expected the idea to be this controversial...
> I think you should try using it once <wink>.
You're right. I'll shut up now.
Greg
More information about the Python-list
mailing list