< prev index next > src/hotspot/share/runtime/serviceThread.cpp
Print this page
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/serviceThread.hpp"
+ #include "runtime/lightweightSynchronizer.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiTagMap.hpp"
#include "prims/resolvedMethodTable.hpp"
JvmtiDeferredEvent jvmti_event;
bool oop_handles_to_release = false;
bool cldg_cleanup_work = false;
bool jvmti_tagmap_work = false;
bool oopmap_cache_work = false;
+ bool omworldtable_work = false;
{
// Need state transition ThreadBlockInVM so that this thread
// will be handled by safepoint correctly when this thread is
// notified at a safepoint.
(protection_domain_table_work = ProtectionDomainCacheTable::has_work()) |
(oopstorage_work = OopStorage::has_cleanup_work_and_reset()) |
(oop_handles_to_release = JavaThread::has_oop_handles_to_release()) |
(cldg_cleanup_work = ClassLoaderDataGraph::should_clean_metaspaces_and_reset()) |
(jvmti_tagmap_work = JvmtiTagMap::has_object_free_events_and_reset()) |
- (oopmap_cache_work = OopMapCache::has_cleanup_work())
+ (oopmap_cache_work = OopMapCache::has_cleanup_work()) |
+ (omworldtable_work = LightweightSynchronizer::needs_resize())
) == 0) {
// Wait until notified that there is some work to do or timer expires.
// Some cleanup requests don't notify the ServiceThread so work needs to be done at periodic intervals.
ml.wait(ServiceThreadCleanupInterval);
}
}
if (oopmap_cache_work) {
OopMapCache::cleanup();
}
+
+ if (omworldtable_work) {
+ LightweightSynchronizer::resize_table(jt);
+ }
}
}
void ServiceThread::enqueue_deferred_event(JvmtiDeferredEvent* event) {
MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
< prev index next >