This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GC statistics (was Re: big project ported)


Bryce McKinlay wrote:
> 
> Jeff Sturm wrote:
> 
> > I'd like to know:
> >
> >  - how often the collector runs
> >  - how long (on average) the collector runs
> >  - how many objects (total) are allocated
> >  - average allocation size
> >
> > ...among other things.  the first two are loosely reported by the
> > -verbosegc option of the JDK.  I don't know if there are appropriate
> > hooks in the Boehm collector offhand.  The last two measurements can be
> > done in libgcj proper.
> 
> If you compile gc with -DPRINTSTATS and/or -DPRINTTIMES it should will give you
> some of this information.

Thanks Bryce.  It turns out that -DPRINTSTATS and -DPRINTTIMES are the
default if I remove -DSILENT from the Makefile.

It may not be working correctly though... on the first collection it
printed

 Initiating full world-stop collection 2 after 16946220 allocd bytes
 0 bytes in heap blacklisted for interior pointers
 --> Marking for collection 2 after 16946220 allocd bytes + 14280 wasted
bytes
 Collection 1 reclaimed 0 bytes ---> heapsize = 67174400 bytes
 World-stopped marking took 20 msecs
 Bytes recovered before sweep - f.l. count = -103180
 Immediately reclaimed 16848164 bytes in heap of size 67174400 bytes
 12296 (atomic) + 32208 (composite) collectable bytes in use
 Finalize + initiate sweep took 0 + 10 msecs

and then immediately dumped core.  I guess we really need to upgrade
boehm-gc...

-- 
Jeff Sturm
jsturm@sigma6.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]