garbage collection take too much time to execute....

Hans Boehm Hans.Boehm@hp.com
Wed Jun 18 05:39:00 GMT 2008


This looks weird to me.  I don't see anything in the log that suggests 
where the time is going.  There are about 16MB of roots, which is slightly 
suspicious, but not enough to easily explain more than at most 100msecs or 
so of tracing time on a modern machine.

If I were debugging this, I'd interrupt execution at a few random points 
during GC and see what it's doing.  It's still conceivable that it's 
tracing some extra memory, and that memory is somehow very slow to access, 
e.g. because it's mapped to some peripheral.  But this looks different 
from what I remember.

It would still be good to know whether this happens with newer versions.

Hans

  On Tue, 17 Jun 2008, - - wrote:

> Hi,
> I run the program with both environment variables set to 1.
> Previous I run with just one single variable set.
>
> export GC_DUMP_REGULARLY=1
> export GC_PRINT_STATS=1
>
> As you can see, the first time when button is pushed
> the output is about 12 seconds!!! .
> Next the run is about 5 seconds....
>
> I'll try to setup a compiler environment with more recent release of gcj and come back with results.
>
> In the mean time I tried to understand the output of code but I'm a novice and need help.
>
>
> $ snippet.exe
> paintControl()
> widgetSelected()
> start
> Elapsed milliseconds: 11921
> end
> paintControl()
> widgetSelected()
> start
> Elapsed milliseconds: 4765
> end
> paintControl()
> widgetSelected()
> start
> Elapsed milliseconds: 4750
> end
> paintControl()
> widgetSelected()
> start
> Elapsed milliseconds: 4812
> end
> paintControl()
>
>
>
> thanks
> x10.
>
>
>
>
> --- On Tue, 6/17/08, Boehm, Hans  wrote:
>
>> From: Boehm, Hans <hans.boehm@hp.com>
>> Subject: RE: garbage collection take too much time to execute....
>
>> Date: Tuesday, June 17, 2008, 7:51 PM
>> Did you try with a recent version of gcj?
>>
>> In the past, there have been problems with the collector
>> looking for pointers in graphics memory.  You can try
>> running the program with the GC_DUMP_REGULARLY environment
>> variable set, and look at the size of the root sets.  If it
>> appears to include your graphics memory, then that's
>> probably the issue.
>>
>> If not, GC_PRINT_STATS output might be helpful.
>>
>> Hans
>>
>>> -----Original Message-----
>>> On Behalf Of - -
>>> Sent: Tuesday, June 17, 2008 8:23 AM
>>> Subject: garbage collection take too much time to
>> execute....
>>>
>>>
>>> Hi,
>>> I found a strange behaviour on code generated by gcj
>> when
>>> compare its output with code generated by eclipse.
>>>
>>> Mainly the code generated by gcj  take too much time
>> to
>>> perform a memory  garbage collection (about 5 seconds)
>>> instead of only 15 milliseconds of byte code generated
>> by eclipse.
>>>
>>> The problem seems to happens when there are canvas and
>>> transform operations. I attach a simple snippet code
>> that
>>> write a vertical text on canvas in order to reproduce
>> the behaviour.
>>>
>>> The gcj compiler I use is:
>>> $ gcj --version
>>> gcj.exe (GCC) 3.4.5 (mingw-vista special r3) Copyright
>> (C)
>>> 2004 Free Software Foundation, Inc.
>>> This is free software; see the source for copying
>> conditions.
>>>  There is NO warranty; not even for MERCHANTABILITY or
>>> FITNESS FOR A PARTICULAR PURPOSE.
>>>
>>> with the swt version 3349:
>> "swt-gdip-win32-3349.dll"  and
>>> "swt-win32-3349.dll"
>>>
>>> I'm new of this discussion list, hoping not annoy
>> you. It is
>>> a trouble or it is just a mistake on usage of
>> transform?
>>> thanks you,
>>>
>>> x10
>>>
>>
>
>
>



More information about the Java mailing list