comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @ 7179:d0aa87f04bd5

8003720: NPG: Method in interpreter stack frame can be deallocated Summary: Pass down a closure during root scanning to keep the class of the method alive. Reviewed-by: coleenp, jcoomes
author stefank
date Tue, 27 Nov 2012 10:13:20 +0100
parents 4202510ee0fe
children a08c80e9e1e5
comparison
equal deleted inserted replaced
7178:19c1bd641922 7179:d0aa87f04bd5
493 // General strong roots. 493 // General strong roots.
494 { 494 {
495 ParallelScavengeHeap::ParStrongRootsScope psrs; 495 ParallelScavengeHeap::ParStrongRootsScope psrs;
496 Universe::oops_do(mark_and_push_closure()); 496 Universe::oops_do(mark_and_push_closure());
497 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles 497 JNIHandles::oops_do(mark_and_push_closure()); // Global (strong) JNI handles
498 CLDToOopClosure mark_and_push_from_cld(mark_and_push_closure());
498 CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true); 499 CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true);
499 Threads::oops_do(mark_and_push_closure(), &each_active_code_blob); 500 Threads::oops_do(mark_and_push_closure(), &mark_and_push_from_cld, &each_active_code_blob);
500 ObjectSynchronizer::oops_do(mark_and_push_closure()); 501 ObjectSynchronizer::oops_do(mark_and_push_closure());
501 FlatProfiler::oops_do(mark_and_push_closure()); 502 FlatProfiler::oops_do(mark_and_push_closure());
502 Management::oops_do(mark_and_push_closure()); 503 Management::oops_do(mark_and_push_closure());
503 JvmtiExport::oops_do(mark_and_push_closure()); 504 JvmtiExport::oops_do(mark_and_push_closure());
504 SystemDictionary::always_strong_oops_do(mark_and_push_closure()); 505 SystemDictionary::always_strong_oops_do(mark_and_push_closure());
582 ClassLoaderDataGraph::clear_claimed_marks(); 583 ClassLoaderDataGraph::clear_claimed_marks();
583 584
584 // General strong roots. 585 // General strong roots.
585 Universe::oops_do(adjust_root_pointer_closure()); 586 Universe::oops_do(adjust_root_pointer_closure());
586 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles 587 JNIHandles::oops_do(adjust_root_pointer_closure()); // Global (strong) JNI handles
587 Threads::oops_do(adjust_root_pointer_closure(), NULL); 588 CLDToOopClosure adjust_from_cld(adjust_root_pointer_closure());
589 Threads::oops_do(adjust_root_pointer_closure(), &adjust_from_cld, NULL);
588 ObjectSynchronizer::oops_do(adjust_root_pointer_closure()); 590 ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
589 FlatProfiler::oops_do(adjust_root_pointer_closure()); 591 FlatProfiler::oops_do(adjust_root_pointer_closure());
590 Management::oops_do(adjust_root_pointer_closure()); 592 Management::oops_do(adjust_root_pointer_closure());
591 JvmtiExport::oops_do(adjust_root_pointer_closure()); 593 JvmtiExport::oops_do(adjust_root_pointer_closure());
592 // SO_AllClasses 594 // SO_AllClasses