I'm implementing a GC algorithm for HotSpot these days. My GC algorithm is concurrent. As we all know, CMF may be occurred when doing GC. I just know that concurrent GCs will cause a Serial Old GC to handle CMF. Is this operation should be implemented by myself or the HotSpot will handle it for me(if so, how to notify HotSpot to do it for me)? Looking forward to your answers.
Asked
Active
Viewed 25 times
0
-
Which JEP are you referring to? – Stephen C Aug 28 '23 at 09:51
-
jep304, maybe@StephenC – Lizbing Aug 28 '23 at 09:52
-
If you are implementing a GC algorithm yourself, then your code is going to be **part of** the HotSpot platform. I' – Stephen C Aug 28 '23 at 09:53
-
I know, I builds my own hotspot @StephenC – Lizbing Aug 28 '23 at 09:55
-
In that case ... it is up to >you< how you handle it :-) But seriously, if you are implementing your own HotSpot GC, you will need a deeper understanding of how Java / HotSpot GC works than you can get by asking StackOverflow questions. Read the source Luke! I'd start by looking at the code of concurrent collections like G1GC and ZGC to see how they handle the CMF problem. – Stephen C Aug 28 '23 at 10:00
-
(JEP 304 itself didn't specify the details how the GC Interfaces should work. The *results* of the JEP are ... AFAIK ... code that is now part of the OpenJDK codebase.) – Stephen C Aug 28 '23 at 10:09