aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/runtime/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/runtime/thread.cpp')
-rw-r--r--src/share/vm/runtime/thread.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/share/vm/runtime/thread.cpp b/src/share/vm/runtime/thread.cpp
index 45c73408b..23b0bbf32 100644
--- a/src/share/vm/runtime/thread.cpp
+++ b/src/share/vm/runtime/thread.cpp
@@ -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 @@ bool Thread::claim_oops_do_par_case(int strong_roots_parity) {
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 @@ public:
}
};
-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 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
// 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 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
// 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 @@ 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);
+ oops_do(&VerifyOopClosure::verify_oop, NULL, NULL);
// Verify the stack frames.
frames_do(frame_verify);
@@ -3125,7 +3122,7 @@ class PrintAndVerifyOopClosure: public OopClosure {
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 @@ CompilerThread::CompilerThread(CompileQueue* queue, CompilerCounters* counters)
#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 Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
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 @@ bool Threads::includes(JavaThread* p) {
// 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 @@ void Threads::possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf) {
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);
}
}