A question in ZGC

Liang Mao maoliang.ml at alibaba-inc.com
Thu Dec 3 10:02:53 UTC 2020

Dear ZGC developers,

May I ask a detailed question about the following code?

void ZMark::follow_array_object(objArrayOop obj, bool finalizable) {
  if (finalizable) {
    ZMarkBarrierOopClosure<true /* finalizable */> cl;
  } else {
    ZMarkBarrierOopClosure<false /* finalizable */> cl;

I'm confused with this. Why do we need to specificaly visit the object array's
 klass(actually the class load data) when we are marking the object array?
 It comes from JDK12:8214897: ZGC: Concurrent Class Unloading.


More information about the zgc-dev mailing list