On Jan 8, 2009, at 5:01 PM, Michael Abshoff wrote:

> Robert Bradshaw wrote:
>> On Jan 8, 2009, at 4:10 PM, Michael Abshoff wrote:
>
> Hi Robert,
>
> <SNIP>
>
>>> I am tempted to drop in 0.11-devel and see if it compiles the
>>> Sage
>>> library and if it then even starts Sage :).
>>
>> I've been meaning to do the same too, but just haven't had time. I
>> haven't tried compiling Sage with 0.11 for too long...
>
> Well, I don't get very far:
>
> AttributeError: 'CoerceToTempNode' object has no attribute 'old_temp'
> Traceback (most recent call last):

[...]

> line 666, in release_temp_result
>      if self.old_temp:
> AttributeError: 'CoerceToTempNode' object has no attribute 'old_temp'
>
> This is head of 0.11-devel and I made sure the old Cython was removed.

:(

>
>>> Hopefully 0.11 will come soon
>>
>> Yep. I think the primary bottleneck is the above (and fixing any bugs
>> we find there). I would also like a "memleak" mode for doctests, like
>> the timing code, where it would run each block, say, twice, then get
>> the memory usage, then run the block again and see if it went up at
>> all. This would be great to have in general, but would also make me
>> much happier knowing I didn't introduce new memory leaks.
>
> I think running things in a loop until they no longer grow the heap is
> great, but running it twice will likely not even come close to cutting
> it.

As a regression tool, I would be happy if the memory increase  
remained the same with the old and new Cython (or, e.g., between runs  
of Sage). At least it could probably pinpoint egregious issues. I bet  
twice is enough for 90+% of the code out there.

> I have played with muppy which offers a mode to do deltas of two
> heap states and I have plans to add this to Sage once I find time,  
> i.e.
> I would run a doctest in a loop a reasonable number of times and if it
> still leaks after say 100 reps we have a problem. But this is  
> mostly in
> the "it would be really nice to have" stage at this point :)
>
> It might be interesting to check out how muppy would fit into this  
> leak
> testing framework. It is similar to guppy, but seems faster and more
> elegant. guppy seems to be more powerful overall, but if I get what I
> want out of muppy I wouldn't care.
>
>>> and we will find a way to integrate the refcount nanny as a special
>>> mode during doctesting of Sage, i.e. during compile time of Cython
>>> activate it and if we then somehow could have the doctesting  
>>> framework
>>> have some mode where *every* reference was watched this would truly
>>> rock. If this is expensive performance wise it doesn't matter  
>>> since it
>>> would be a special debug mode :)
>>
>> Yeah. Even if it was slower, it wouldn't be as slow as Valgrind
>
> Sure, but the memleaks we target here are very different in nature and
> trying to find them with the "other" tool respectively is an  
> exercise in
> futility :(
>
> And valgrind offers other fun tools like exp-omega, exp-ptrcheck  
> and so
> on :)

Yes, I was commenting on the fact that we don't worry about  
performance loss in these cases.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to