src/share/vm/memory/genMarkSweep.cpp

changeset 1435
a1423fe86a18
parent 1383
89e0543e1737
parent 1428
54b3b351d6f9
child 1746
2a1472c30599
     1.1 --- a/src/share/vm/memory/genMarkSweep.cpp	Fri Oct 02 11:26:25 2009 -0700
     1.2 +++ b/src/share/vm/memory/genMarkSweep.cpp	Fri Oct 09 15:18:52 2009 -0700
     1.3 @@ -244,9 +244,12 @@
     1.4  
     1.5    gch->gen_process_strong_roots(level,
     1.6                                  false, // Younger gens are not roots.
     1.7 +                                true,  // activate StrongRootsScope
     1.8                                  true,  // Collecting permanent generation.
     1.9                                  SharedHeap::SO_SystemClasses,
    1.10 -                                &follow_root_closure, &follow_root_closure);
    1.11 +                                &follow_root_closure,
    1.12 +                                true,   // walk code active on stacks
    1.13 +                                &follow_root_closure);
    1.14  
    1.15    // Process reference objects found during marking
    1.16    {
    1.17 @@ -338,14 +341,19 @@
    1.18  
    1.19    gch->gen_process_strong_roots(level,
    1.20                                  false, // Younger gens are not roots.
    1.21 +                                true,  // activate StrongRootsScope
    1.22                                  true,  // Collecting permanent generation.
    1.23                                  SharedHeap::SO_AllClasses,
    1.24                                  &adjust_root_pointer_closure,
    1.25 +                                false, // do not walk code
    1.26                                  &adjust_root_pointer_closure);
    1.27  
    1.28    // Now adjust pointers in remaining weak roots.  (All of which should
    1.29    // have been cleared if they pointed to non-surviving objects.)
    1.30 +  CodeBlobToOopClosure adjust_code_pointer_closure(&adjust_pointer_closure,
    1.31 +                                                   /*do_marking=*/ false);
    1.32    gch->gen_process_weak_roots(&adjust_root_pointer_closure,
    1.33 +                              &adjust_code_pointer_closure,
    1.34                                &adjust_pointer_closure);
    1.35  
    1.36    adjust_marks();

mercurial