< prev index next >
src/hotspot/share/prims/whitebox.cpp
Print this page
rev 56048 : Add OM_CACHE_LINE_SIZE so that ObjectMonitor cache line sizes can be experimented with independently of DEFAULT_CACHE_LINE_SIZE; for SPARC and X64 configs that use 128 for DEFAULT_CACHE_LINE_SIZE, we are experimenting with 64; move _previous_owner_tid and _allocation_state fields to share the cache line with ObjectMonitor::_header; put ObjectMonitor::_ref_count on its own cache line after _owner; add 'int* count_p' parameter to deflate_monitor_list() and deflate_monitor_list_using_JT() and push counter updates down to where the ObjectMonitors are actually removed from the in-use lists; monitors_iterate() async deflation check should use negative ref_count; add 'JavaThread* target' param to deflate_per_thread_idle_monitors_using_JT() add deflate_common_idle_monitors_using_JT() to make it clear which JavaThread* is the target of the work and which is the calling JavaThread* (self); g_free_list, g_om_in_use_list and g_om_in_use_count are now static to synchronizer.cpp (reduce scope); add more diagnostic info to some assert()'s; minor code cleanups and code motion; save_om_ptr() should detect a race with a deflating thread that is bailing out and cause a retry when the ref_count field is not positive; merge with jdk-14+11; add special GC support for TestHumongousClassLoader.java; merge with 8230184.patch.
*** 68,77 ****
--- 68,78 ----
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/sweeper.hpp"
+ #include "runtime/synchronizer.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadSMR.hpp"
#include "runtime/vm_version.hpp"
#include "services/memoryService.hpp"
#include "utilities/align.hpp"
*** 460,469 ****
--- 461,476 ----
THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1InConcurrentMark: G1 GC is not enabled");
WB_END
WB_ENTRY(jboolean, WB_G1StartMarkCycle(JNIEnv* env, jobject o))
if (UseG1GC) {
+ if (AsyncDeflateIdleMonitors) {
+ // AsyncDeflateIdleMonitors needs to know when System.gc() or
+ // the equivalent is called so any special clean up can be done
+ // at a safepoint, e.g., TestHumongousClassLoader.java.
+ ObjectSynchronizer::set_is_special_deflation_requested(true);
+ }
G1CollectedHeap* g1h = G1CollectedHeap::heap();
if (!g1h->concurrent_mark()->cm_thread()->during_cycle()) {
g1h->collect(GCCause::_wb_conc_mark);
return true;
}
*** 1379,1388 ****
--- 1386,1401 ----
jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len, CHECK_false);
return (StringTable::lookup(name, len) != NULL);
WB_END
WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o))
+ if (AsyncDeflateIdleMonitors) {
+ // AsyncDeflateIdleMonitors needs to know when System.gc() or
+ // the equivalent is called so any special clean up can be done
+ // at a safepoint, e.g., TestHumongousClassLoader.java.
+ ObjectSynchronizer::set_is_special_deflation_requested(true);
+ }
Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(true);
Universe::heap()->collect(GCCause::_wb_full_gc);
#if INCLUDE_G1GC
if (UseG1GC) {
// Needs to be cleared explicitly for G1
< prev index next >