~jelmer/meliae/hurd

Viewing all changes in revision 176.

  • Committer: John Arbash Meinel
  • Date: 2010-07-31 06:39:43 UTC
  • Revision ID: john@arbash-meinel.com-20100731063943-7sa8xnqy62eiuaj2
Add more convenience helpers.

These are actually pretty nice for probing into the details about what is
semi-exclusively referenced from X.

Note that because of refcycles it can be tricky to determine if objects
share intermediate resources. For example:
  b <= Y <=> Z => a
In this case, Z looks like it references both a and b. However, if the
cycle was broken, then it would not. One option is to refine exclusion lists.
o_from_y = [o.address for o in y.iter_recursive_refs(excluding=[z.address])]
o_from_just_z = [o for o in z.iter_recursive_refs(excluding=o_from_y)]
etc.
I'm also not perfectly satisfied that excluding takes addresses vs objects.
Though I think it performs better that way, since you avoid all the extra
proxy objects, and just have a set/list of python integers.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: