[Gc] stack problem

Romano Tenca rotenca at gmail.com
Tue Sep 30 06:13:37 PDT 2008


Boehm, Hans ha scritto:
> Could you try this with 7.1?  There was a significant performance bug fix shortly before that release.  I'm not sure that's the issue here, but it would be good to preclude that.
>
>   
I have tested the program with last CVS version.
I have tested it with native thread support and with pthreadw32 
support,  with THREAD_LOCAL_ALLOC and without., with LARGE_CONFIG and 
without, with MUNMAP and without.

The results are always the same.

Then i have tested it with GC without thread support and the results 
change a lot:

After 0 recursions 10 GC_gcollect() time is: 0.03125
After 5000 recursions 10 GC_gcollect() time is: 0.0625
After 10000 recursions 10 GC_gcollect() time is: 0.109375
After 15000 recursions 10 GC_gcollect() time is: 0.140625
After 20000 recursions 10 GC_gcollect() time is: 0.171875
After 25000 recursions 10 GC_gcollect() time is: 0.21875

and when i try again the recursive functions results are exactly the 
same: stack problem is gone.


> If that doesn't work, see below:
>   
Is the issue just that you're starting out with nothing in the heap?  The final times in the two cases don't seem that different?  I agree that the absolute times seem way too long for the heap size, so that's probably not it.

This is a whole session with native thread support

Heap: 5505024 Free: 4009984 Used: 1495040 Collections: 1

After 0 recursions 10 GC_gcollect() time is: 0.03125
After 5000 recursions 10 GC_gcollect() time is: 0.1875
After 10000 recursions 10 GC_gcollect() time is: 0.5625
After 15000 recursions 10 GC_gcollect() time is: 1.125
After 20000 recursions 10 GC_gcollect() time is: 1.90625
After 25000 recursions 10 GC_gcollect() time is: 2.890625

Heap: 5505024 Free: 4308992 Used: 1196032 Collections: 61

After 0 recursions 10 GC_gcollect() time is: 2.703125
After 5000 recursions 10 GC_gcollect() time is: 2.734375
After 10000 recursions 10 GC_gcollect() time is: 2.78125
After 15000 recursions 10 GC_gcollect() time is: 2.8125
After 20000 recursions 10 GC_gcollect() time is: 2.859375
After 25000 recursions 10 GC_gcollect() time is: 2.90625

Heap: 5505024 Free: 4308992 Used: 1196032 Collections: 121

Absolute times start at the same level and grow a lot more fast than in 
version without thread support.
I have never seen any GC warn. Could be useful to know that my C stack 
is 5MB.

GC_push_stack_for() contains some debugging code that prints out how much of the stack is actually getting pushed.  It's normally not compiled in, but it would be easy to turn on for an experiment.  There is fallback code that pushes the whole stack, but that shouldn't be getting used.  And it should generate warnings if it is used.


This is the debug session output (with only 1 call to GC_gcollect), for 
what i can undertand the stack is "pushed" in the correct size.

Heap: 5308416 Free: 3801088 Used: 1507328 Collections: 1

After 0 recursions 1 GC_gcollect() time is: 0.0
After 5000 recursions 1 GC_gcollect() time is: 0.015625
After 10000 recursions 1 GC_gcollect() time is: 0.0625
After 15000 recursions 1 GC_gcollect() time is: 0.109375
After 20000 recursions 1 GC_gcollect() time is: 0.1875
After 25000 recursions 1 GC_gcollect() time is: 0.265625

Heap: 5308416 Free: 4104192 Used: 1204224 Collections: 7

After 0 recursions 1 GC_gcollect() time is: 0.234375
After 5000 recursions 1 GC_gcollect() time is: 0.234375
After 10000 recursions 1 GC_gcollect() time is: 0.25
After 15000 recursions 1 GC_gcollect() time is: 0.25
After 20000 recursions 1 GC_gcollect() time is: 0.265625
After 25000 recursions 1 GC_gcollect() time is: 0.265625

Heap: 5308416 Free: 4104192 Used: 1204224 Collections: 13

Debug GC file:

Pushing thread from 0098F9EC to 00990000 for 0xb2c from 0xb2c
Pushing thread from 0098F43C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 008A4E3C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 007BA83C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 006D023C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 005E5C3C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 004FB63C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 0098F43C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 008A4E3C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 007BA83C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 006D023C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 005E5C3C to 00990000 for 0xb2c from 0xb2c
Pushing thread from 004FB63C to 00990000 for 0xb2c from 0xb2c


regards

Romano Paolo Tenca


More information about the Gc mailing list