src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/thread.cpp	Thu Nov 22 14:37:34 2012
--- new/src/share/vm/runtime/thread.cpp	Thu Nov 22 14:37:34 2012

*** 824,834 **** --- 824,834 ---- assert(SharedHeap::heap()->workers()->active_workers() > 0, "Should only fail when parallel."); return false; } ! void Thread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { active_handles()->oops_do(f); // Do oop for ThreadShadow f->do_oop((oop*)&_pending_exception); handle_area()->oops_do(f); }
*** 2703,2721 **** --- 2703,2721 ---- _cur_thr->set_processed_thread(NULL); } } }; ! void JavaThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { // Verify that the deferred card marks have been flushed. assert(deferred_card_mark().is_empty(), "Should be empty during GC"); // The ThreadProfiler oops_do is done from FlatProfiler::oops_do // since there may be more than one thread using each ThreadProfiler. // Traverse the GCHandles ! Thread::oops_do(f, cld_f, cf); assert( (!has_last_Java_frame() && java_call_counter() == 0) || (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!"); if (has_last_Java_frame()) {
*** 2739,2749 **** --- 2739,2749 ---- chunk->oops_do(f); } // Traverse the execution stack for(StackFrameStream fst(this); !fst.is_done(); fst.next()) { ! fst.current()->oops_do(f, cld_f, cf, fst.register_map()); } } // callee_target is never live across a gc point so NULL it here should // it still contain a methdOop.
*** 2873,2883 **** --- 2873,2883 ---- static void frame_verify(frame* f, const RegisterMap *map) { f->verify(map); } void JavaThread::verify() { // Verify oops in the thread. ! oops_do(&VerifyOopClosure::verify_oop, NULL, NULL); // Verify the stack frames. frames_do(frame_verify); }
*** 3123,3133 **** --- 3123,3133 ---- static void oops_print(frame* f, const RegisterMap *map) { PrintAndVerifyOopClosure print; f->print_value(); ! f->oops_do(&print, NULL, (RegisterMap*)map); ! f->oops_do(&print, NULL, NULL, (RegisterMap*)map); } // Print our all the locations that contain oops and whether they are // valid or not. This useful when trying to find the oldest frame // where an oop has gone bad since the frame walk is from youngest to
*** 3225,3236 **** --- 3225,3236 ---- #ifndef PRODUCT _ideal_graph_printer = NULL; #endif } ! void CompilerThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { ! JavaThread::oops_do(f, cld_f, cf); if (_scanned_nmethod != NULL && cf != NULL) { // Safepoints can occur when the sweeper is scanning an nmethod so // process it here to make sure it isn't unloaded in the middle of // a scan. cf->do_code_blob(_scanned_nmethod);
*** 4196,4213 **** --- 4196,4213 ---- // In particular, these things should never be called when the Threads_lock // is held by some other thread. (Note: the Safepoint abstraction also // uses the Threads_lock to gurantee this property. It also makes sure that // all threads gets blocked when exiting or starting). ! void Threads::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { ALL_JAVA_THREADS(p) { ! p->oops_do(f, cld_f, cf); } ! VMThread::vm_thread()->oops_do(f, cld_f, cf); } ! void Threads::possibly_parallel_oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { // Introduce a mechanism allowing parallel threads to claim threads as // root groups. Overhead should be small enough to use all the time, // even in sequential code. SharedHeap* sh = SharedHeap::heap(); // Cannot yet substitute active_workers for n_par_threads
*** 4220,4235 **** --- 4220,4235 ---- (SharedHeap::heap()->n_par_threads() == SharedHeap::heap()->workers()->active_workers()), "Mismatch"); int cp = SharedHeap::heap()->strong_roots_parity(); ALL_JAVA_THREADS(p) { if (p->claim_oops_do(is_par, cp)) { ! p->oops_do(f, cld_f, cf); } } VMThread* vmt = VMThread::vm_thread(); if (vmt->claim_oops_do(is_par, cp)) { ! vmt->oops_do(f, cld_f, cf); } } #ifndef SERIALGC // Used by ParallelScavenge

src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File