[Gc] Re: Understanding why GC'ing increases to the double in time?

Martin Egholm Nielsen martin at egholm-nielsen.dk
Tue Mar 14 12:32:36 PST 2006


> Off the top of my head, with no testing, something like
Nice top, then!

> 1) Remove the static declaration from gcj_describe_type_fn.  If you
> can't recompile, it is in a table somewhere.  But that gets messier.
Luckily I can!

> 2) You might add the actual printing code to GC_print_block_descr.
> Declare a buffer
> 
> char type_buf[GC_TYPE_DESCR_LEN];
> 
> When you see a sufficiently large block h with hhdr -> hb_obj_kind !=
> PTRFREE, walk the beginning of the object, a word at a time, with
> something like
> 
> word *p;
> 
> for (p = (word *)h; 0 != ; ++p) {
>     if (GC_base(*p) != 0) {
>       gcj_describe_type_fn((void *)(*p), type_buf);
> 	... print p and type_buf ...
>     }
> }
For now I'm take "something like" as "exactly like" (though with "0 !=" 
as "0 != p").
It compiles, and now I have a new libgcj ready for testing in the morrow 
- so so exciting!

> 3) Continue to call GC_dump(), which should now also print this stuff.
I'll rely on dump-regularly for this...

// Martin



More information about the Gc mailing list