[Ecls-list] Consing statistics?

Dave Roberts dave at vyatta.com
Thu Dec 21 00:05:17 UTC 2006

Juan Jose Garcia-Ripoll wrote:
> 2006/12/20, Dave Roberts <dave at vyatta.com>:
>> How can I figure out how much consing has gone on when calling a
>> particular function? I'm used to using (TIME <form>) and having it print
>> out appropriate consing statistics in addition to the time spent. Using
>> the Boehm-Weiser GC, TIME and ROOM don't seem to produce anything useful.
> I haven't yet figured out how to get this information from the
> Boehm-Weiser GC. That's the reason why ROOM and TIME do not output
> consing statistics.

I took a look at the Boehm collector and found a few stats that seemed 
interesting. The attached patch modifies TIME so that it prints out the 
number of bytes consed in the timed form, as well as the number of GCs. 
The GC code keeps an unsigned value of the number of bytes consed so 
far, which wraps. This code will deal with the wrap, but may misreport 
the amount of consing if it exceeds 2^(sizeof(unsigned)*8) in a single 
call to TIME.

Please apply or edit as appropriate.


-- Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: time-gc-stats.patch
Type: text/x-patch
Size: 2442 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20061220/99f80cd5/attachment.bin>

More information about the ecl-devel mailing list