Entry function of GC Collection

Abhinav Jangda abhijangda at hotmail.com
Thu Jul 30 03:10:41 UTC 2015

Yes, I was looking for these methods. Thanks a lot for all of you.

I did some more digging and found out that The type of generation in Serial GC is TenuredGeneration. Now, TenuredGeneration::collect () calls OneContigSpaceCardGeneration::collect (). But in OneContigSpaceCardGeneration::collect () I couldn't see any code related to collect or relevant to collect. Please tell me if collection is happening somewhere else or here? If somewhere else then where?
I can see that TenuredGeneration::collect () is called from _gens[i]->collect(full, do_clear_all_soft_refs, size, is_tlab); in GenCollectedHeap::do_collection () function in file genCollectedHeap.cpp.

Thank You,

Date: Mon, 27 Jul 2015 11:28:46 -0700
From: jon.masamitsu at oracle.com
To: hotspot-gc-dev at openjdk.java.net
Subject: Re: Entry function of GC Collection

    You're perhaps looking for the collect() methods.


    For example,


    void TenuredGeneration::collect()




    void DefNewGeneration::collect()




    On 07/25/2015 01:30 PM, Abhinav Jangda

      Hello all,


        I have been working on a project which requires me to change GC
        Algorithm in Java Hotspot VM. I have been trying to understand
        the source code of GC in Hotspot VM. I know a couple of details
        about GC in Hotspot now. But I am not able to find the start
        function of GC Collection. I think VM_GenCollectFull::doit
        and VM_GenCollectForAllocation::doit() are the two
        functions called for GC. But if I add std::cout
        statements at the start of these functions and start the Dacapo
        Benchmarks I couldn't see any result produced by std::cout
        statements. I want to work with SerialGC.

        Here is the command I used to run Hotspot:


        ./java -XX:+UseSerialGC -jar dacapo.jar jython


        OpenJDK version is 8 and I am compiling building openjdk using
        following command


        make CONF=linux-x86_64-normal-server-release


        It will be great if anyone of you could help me.


        Thank You,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20150730/94e5d2ad/attachment.html>

More information about the hotspot-gc-dev mailing list