comparison src/share/vm/gc_implementation/g1/g1MarkSweep.cpp @ 989:148e5441d916

6863023: need non-perm oops in code cache for JSR 292 Summary: Make a special root-list for those few nmethods which might contain non-perm oops. Reviewed-by: twisti, kvn, never, jmasa, ysr
author jrose
date Tue, 15 Sep 2009 21:53:47 -0700
parents bd02caa94611
children 54b3b351d6f9
comparison
equal deleted inserted replaced
987:00977607da34 989:148e5441d916
114 TraceTime tm("phase 1", PrintGC && Verbose, true, gclog_or_tty); 114 TraceTime tm("phase 1", PrintGC && Verbose, true, gclog_or_tty);
115 GenMarkSweep::trace(" 1"); 115 GenMarkSweep::trace(" 1");
116 116
117 SharedHeap* sh = SharedHeap::heap(); 117 SharedHeap* sh = SharedHeap::heap();
118 118
119 sh->process_strong_roots(true, // Collecting permanent generation. 119 sh->process_strong_roots(true, // activeate StrongRootsScope
120 true, // Collecting permanent generation.
120 SharedHeap::SO_SystemClasses, 121 SharedHeap::SO_SystemClasses,
121 &GenMarkSweep::follow_root_closure, 122 &GenMarkSweep::follow_root_closure,
123 &GenMarkSweep::follow_code_root_closure,
122 &GenMarkSweep::follow_root_closure); 124 &GenMarkSweep::follow_root_closure);
123 125
124 // Process reference objects found during marking 126 // Process reference objects found during marking
125 ReferenceProcessor* rp = GenMarkSweep::ref_processor(); 127 ReferenceProcessor* rp = GenMarkSweep::ref_processor();
126 rp->setup_policy(clear_all_softrefs); 128 rp->setup_policy(clear_all_softrefs);
274 TraceTime tm("phase 3", PrintGC && Verbose, true, gclog_or_tty); 276 TraceTime tm("phase 3", PrintGC && Verbose, true, gclog_or_tty);
275 GenMarkSweep::trace("3"); 277 GenMarkSweep::trace("3");
276 278
277 SharedHeap* sh = SharedHeap::heap(); 279 SharedHeap* sh = SharedHeap::heap();
278 280
279 sh->process_strong_roots(true, // Collecting permanent generation. 281 sh->process_strong_roots(true, // activate StrongRootsScope
282 true, // Collecting permanent generation.
280 SharedHeap::SO_AllClasses, 283 SharedHeap::SO_AllClasses,
281 &GenMarkSweep::adjust_root_pointer_closure, 284 &GenMarkSweep::adjust_root_pointer_closure,
285 NULL, // do not touch code cache here
282 &GenMarkSweep::adjust_pointer_closure); 286 &GenMarkSweep::adjust_pointer_closure);
283 287
284 g1h->ref_processor()->weak_oops_do(&GenMarkSweep::adjust_root_pointer_closure); 288 g1h->ref_processor()->weak_oops_do(&GenMarkSweep::adjust_root_pointer_closure);
285 289
286 // Now adjust pointers in remaining weak roots. (All of which should 290 // Now adjust pointers in remaining weak roots. (All of which should