Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.cpp @ 7182:c24f778e9401
Merge
author | johnc |
---|---|
date | Thu, 29 Nov 2012 11:23:15 -0800 |
parents | f34d701e952e |
children | d2f8c38e543d |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Wed Nov 28 17:50:21 2012 -0500 +++ b/src/share/vm/runtime/thread.cpp Thu Nov 29 11:23:15 2012 -0800 @@ -65,6 +65,7 @@ #include "runtime/statSampler.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/task.hpp" +#include "runtime/thread.inline.hpp" #include "runtime/threadCritical.hpp" #include "runtime/threadLocalStorage.hpp" #include "runtime/vframe.hpp" @@ -83,19 +84,15 @@ #include "utilities/preserveException.hpp" #ifdef TARGET_OS_FAMILY_linux # include "os_linux.inline.hpp" -# include "thread_linux.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_solaris # include "os_solaris.inline.hpp" -# include "thread_solaris.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" -# include "thread_windows.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" -# include "thread_bsd.inline.hpp" #endif #ifndef SERIALGC #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" @@ -826,7 +823,7 @@ return false; } -void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) { +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); @@ -2705,7 +2702,7 @@ } }; -void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { +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"); @@ -2713,7 +2710,7 @@ // since there may be more than one thread using each ThreadProfiler. // Traverse the GCHandles - Thread::oops_do(f, cf); + 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!"); @@ -2741,7 +2738,7 @@ // Traverse the execution stack for(StackFrameStream fst(this); !fst.is_done(); fst.next()) { - fst.current()->oops_do(f, cf, fst.register_map()); + fst.current()->oops_do(f, cld_f, cf, fst.register_map()); } } @@ -2875,7 +2872,7 @@ void JavaThread::verify() { // Verify oops in the thread. - oops_do(&VerifyOopClosure::verify_oop, NULL); + oops_do(&VerifyOopClosure::verify_oop, NULL, NULL); // Verify the stack frames. frames_do(frame_verify); @@ -3125,7 +3122,7 @@ 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 @@ -3227,8 +3224,8 @@ #endif } -void CompilerThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { - JavaThread::oops_do(f, cf); +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 @@ -3334,6 +3331,9 @@ jint os_init_2_result = os::init_2(); if (os_init_2_result != JNI_OK) return os_init_2_result; + jint adjust_after_os_result = Arguments::adjust_after_os(); + if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; + // intialize TLS ThreadLocalStorage::init(); @@ -4198,14 +4198,14 @@ // 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, CodeBlobClosure* cf) { +void Threads::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { ALL_JAVA_THREADS(p) { - p->oops_do(f, cf); + p->oops_do(f, cld_f, cf); } - VMThread::vm_thread()->oops_do(f, cf); + VMThread::vm_thread()->oops_do(f, cld_f, cf); } -void Threads::possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* 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. @@ -4222,12 +4222,12 @@ int cp = SharedHeap::heap()->strong_roots_parity(); ALL_JAVA_THREADS(p) { if (p->claim_oops_do(is_par, cp)) { - p->oops_do(f, cf); + p->oops_do(f, cld_f, cf); } } VMThread* vmt = VMThread::vm_thread(); if (vmt->claim_oops_do(is_par, cp)) { - vmt->oops_do(f, cf); + vmt->oops_do(f, cld_f, cf); } }