Re: [rvm-research] Trying to learn garbage collection
Robin Garner <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Richard, On 22/04/13 09:05, Thai, Richard P wrote: > > I’m currently trying my hand at making a garbage collector in MMTk and > I’ve followed the tutorial on adding a new GC > (http://jikesrvm.org/Adding+a+New+GC). I’ve also peppered logs > throughout the classes and methods of the new GC I’ve created, but I > don’t think I can really follow what’s happening after running the tests. > > For one, I’ve set the properties file to utilize bitmap marking > (config.mmtk.headerMarkBit=true) in the > BaseBaseMarkSweepTuned.properties file and it doesn’t seem to achieve > anything. > This flag switches between using mark bits in the header of an object and mark bits in a 'side' dense bitmap. The default is to use the header, so all you have done is explicitly chosen the default. Try 'false' and you may notice a difference. Also, the 'config.mmtk' family of properties are picked up from the MMTk properties file in the build/mmtk directory. You can specify them on the command-line of 'buildit' with the '-m' flag - they are orthogonal to the main build config files. You should see an existing config file there called 'sideMarkBit' that does what you're doing. To understand the mark bit mechanism, you should read the following, http://cs.anu.edu.au/~Robin.Garner/pf-ismm-2007.pdf especially part 4 of the paper. > > Another thing, the log files outputted are incredibly large. There’s > no discernible pattern among the methods that are called. I notice a > lot of the alloc/postAlloc calls in the mutator, getPagesUsed, etc, > but the file is too large for me to clearly understand it all. > > Would anyone have any advice as to a better way towards understanding > how GC’s operate in this system? At least well enough so that I can > reasonably affect the files when creating my own. In addition, would > anyone know how to enable bitmap marking with the built-in MarkSweep > collector? > This page http://jikesrvm.org/Memory+Allocation+in+JikesRVM gives a brief introduction to how JikesRVM uses MMTk to allocate memory. You could use Eclipse to trace through the methods in MMTk that this method calls in order to get some understanding of the call pattern. The other tool is to the MMTk Debugging Harness. The main entrypoint for the Harness allocating memory is org.mmtk.harness.vm.ObjectModel#allocateObject. The Harness has several advantages including the fact that you can trace through running code in the Eclipse debugger, and that there are scripts which allocate (for example) just two objects. Regards, Robin > > Best Regards, > > Richard > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > Jikesrvm-researchers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter