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

src/share/vm/runtime/thread.cpp

Print this page

        

*** 64,73 **** --- 64,74 ---- #include "runtime/osThread.hpp" #include "runtime/safepoint.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/statSampler.hpp" #include "runtime/stubRoutines.hpp" + #include "runtime/sweeper.hpp" #include "runtime/task.hpp" #include "runtime/thread.inline.hpp" #include "runtime/threadCritical.hpp" #include "runtime/threadLocalStorage.hpp" #include "runtime/vframe.hpp"
*** 1548,1557 **** --- 1549,1559 ---- } // Remove this ifdef when C1 is ported to the compiler interface. static void compiler_thread_entry(JavaThread* thread, TRAPS); + static void sweeper_thread_entry(JavaThread* thread, TRAPS); JavaThread::JavaThread(ThreadFunction entry_point, size_t stack_sz) : Thread() #if INCLUDE_ALL_GCS , _satb_mark_queue(&_satb_mark_queue_set),
*** 3167,3195 **** static void compiler_thread_entry(JavaThread* thread, TRAPS) { assert(thread->is_Compiler_thread(), "must be compiler thread"); CompileBroker::compiler_thread_loop(); } // Create a CompilerThread CompilerThread::CompilerThread(CompileQueue* queue, CompilerCounters* counters) : JavaThread(&compiler_thread_entry) { _env = NULL; _log = NULL; _task = NULL; _queue = queue; _counters = counters; _buffer_blob = NULL; - _scanned_nmethod = NULL; _compiler = NULL; #ifndef PRODUCT _ideal_graph_printer = NULL; #endif } ! void CompilerThread::oops_do(OopClosure* f, CLDClosure* 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. --- 3169,3205 ---- static void compiler_thread_entry(JavaThread* thread, TRAPS) { assert(thread->is_Compiler_thread(), "must be compiler thread"); CompileBroker::compiler_thread_loop(); } + static void sweeper_thread_entry(JavaThread* thread, TRAPS) { + NMethodSweeper::sweeper_loop(); + } + // Create a CompilerThread CompilerThread::CompilerThread(CompileQueue* queue, CompilerCounters* counters) : JavaThread(&compiler_thread_entry) { _env = NULL; _log = NULL; _task = NULL; _queue = queue; _counters = counters; _buffer_blob = NULL; _compiler = NULL; #ifndef PRODUCT _ideal_graph_printer = NULL; #endif } ! // Create sweeper thread ! CodeCacheSweeperThread::CodeCacheSweeperThread() ! : JavaThread(&sweeper_thread_entry) { ! _scanned_nmethod = NULL; ! } ! void CodeCacheSweeperThread::oops_do(OopClosure* f, CLDClosure* 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.
src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File