You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Xiao-Feng Li <xi...@gmail.com> on 2006/10/18 10:30:49 UTC

[DRLVM][GC](HARMONY-1900) patch to enable GCv5 work in non-generational mode

URL: http://issues.apache.org/jira/browse/HARMONY-1900

This patch has made following improvements mainly:

1. It can work in non-generational mode. To enable it, edit file
gen/gc_for_barrier.cpp to change the NEED_BARRIER to FALSE. This
feature can help to debug and test GC correctness with and without
write barriers, and it also helps to verify the modular design. The
algorithm of the non-gen mode is copy-compaction: every minor
collection copies live objects from nursery space to mature space, and
a major collection will slide compact the whole heap. This is very
similar to the generational counterpart except that it has no remember
set.

(Mikhail Fursov has suggested to use command line option to toggle the
gen/non-gen mode. Yes, that's supposed to be the right way. Actually
this is possible because GCv5 doesn't depend on compilation-time flag
in the gen/non-gen algorithms.)

2. Unified the heap data structure of  NOS (nursery obj space) and MOS
(mature obj space) to use the same blocked orgnization. This helps to
simplify the design with uniform processing for both NOS and MOS
blocks, and it also helps the major collection where NOS and MOS are
handled together.

3. Removed the object remembering sets in write barrier. It is not
needed at the moment and will be added later when needed. The obj
remembering mechanism needs reconsidering when it's time to cleanup
the write barrier interface. The current interface in GC for write
barrier is legacy that will evolve gradually along with GCv5 progress.
The removal also prepares for the marking phase parallelization which
is not in the code but under consideration.

It's recommended to apply this patch and commit in Linux. Windows has
problem to apply it in command line because of the CR/LF.

 Under gc_gen/, `patch -p0 < 01-Gcv5-nowb-unix.patch`

(To test the patch in Windows, please use TurtoiseSVN which can work
around the CR/LF problem. )

Thanks,
xiaofeng

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org