[Ecls-list] Consing statistics?
Dave Roberts
dave at vyatta.com
Sat Dec 23 23:02:51 UTC 2006
On Sat, 2006-12-23 at 17:26 +0100, Juan Jose Garcia-Ripoll wrote:
> 2006/12/21, Dave Roberts <dave at vyatta.com>:
> > 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.
>
> Hi Dave, I had a look at the library. I have committed a patch that
> only works when ECL is built against its own version of the garbage
> collector, but it has the advantage that it is accurate: when the
> counter in the GC wraps around, the library notices it.
I'm not sure I understand the difference? The other patch is only
"inaccurate" if the timed form allocates more than 4 GB of memory.
Otherwise, it is accurate. Are you just keeping more than 32-bit
precision somewhere, modifying the local copy of the Boehm code?
> Besides that,
> statistics are only computed when in TIME, what makes it a very
> innocent change.
I'm not sure I understand this. The other patch did the same thing, no?
> jjgarcia at pcgordo:~/src/ecl$ ecl
> ECL (Embeddable Common-Lisp) 0.9i
> Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
> Copyright (C) 1993 Giuseppe Attardi
> Copyright (C) 2000 Juan J. Garcia-Ripoll
> ECL is free software, and you are welcome to redistribute it
> under certain conditions; see file 'Copyright' for details.
> Type :h for Help. Broken at EVAL.
> > (time (dotimes (i 10000) (cos 1.0)))
> real time : 0.000 secs
> run time : 0.017 secs
> consed : 150892 bytes
> NIL
Is there any reason you removed the count of GCs, which I also find
helpful? The consing is helpful to determine if a form is generating a
lot of memory. The GC count is helpful to determine if you are losing
performance because of GCs or are creating pauses. It would also be nice
to break out the time spent doing GC, but I don't see a nice way to do
that with the current Boehm code.
-- Dave
More information about the ecl-devel
mailing list