[Ecls-list] Consing statistics?

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sun Dec 24 12:17:24 UTC 2006

2006/12/24, Juan Jose Garcia-Ripoll <jjgarcia at users.sourceforge.net>:
> > Otherwise, it is accurate. Are you just keeping more than 32-bit
> > precision somewhere, modifying the local copy of the Boehm code?
> No changes to the Boehm code yet. Before every garbage collection we
> inspect a variable (GC_words_allocd) that counts the number of words
> allocated since the last garbage collection. This is added to a lisp
> integer, which at some point may become a bignum.

Ok, the change is done and it is three-fold:

* Bytes consed is always a bignum which is destructively modifed.
* Number of gc calls is also a bignum wich is also destructively modifed.
* GC statistics is retrieved and activated with si:gc-stats

The new method also works when ECL is linked against a version of the
GC library that has been preinstalled, but in that case it may provide
inaccurate statistics due to C integers wrapping.

I have tested it against the ANSI test suite, which takes a lot of
time to run and conses a lot of bytes. A sample output:

real time : 556.000 secs
run time  : 717.900 secs
gc count  : 547 times
consed    : 8437496360 bytes

Merry Xmas,


Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)

More information about the ecl-devel mailing list