8331015: Obsolete -XX:+UseNotificationThread
Reviewed-by: dholmes, kevinw, sspitsyn, coleenp
This commit is contained in:
parent
97f7c03dd0
commit
8af2ef35b6
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -497,7 +497,7 @@ static bool prepare_for_emergency_dump(Thread* thread) {
|
||||
Service_lock->unlock();
|
||||
}
|
||||
|
||||
if (UseNotificationThread && Notification_lock->owned_by_self()) {
|
||||
if (Notification_lock->owned_by_self()) {
|
||||
Notification_lock->unlock();
|
||||
}
|
||||
|
||||
|
@ -503,7 +503,6 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
{ "RequireSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
|
||||
{ "UseSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
|
||||
{ "DontYieldALot", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
{ "UseNotificationThread", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
{ "LockingMode", JDK_Version::jdk(24), JDK_Version::jdk(26), JDK_Version::jdk(27) },
|
||||
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
|
||||
{ "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
|
||||
@ -512,6 +511,7 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
|
||||
{ "MetaspaceReclaimPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() },
|
||||
|
||||
{ "UseNotificationThread", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
{ "PreserveAllAnnotations", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
{ "UseEmptySlotsInSupers", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
{ "OldSize", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
|
||||
|
@ -952,9 +952,6 @@ const int ObjectAlignmentInBytes = 8;
|
||||
product(bool, EnableThreadSMRStatistics, trueInDebug, DIAGNOSTIC, \
|
||||
"Enable Thread SMR Statistics") \
|
||||
\
|
||||
product(bool, UseNotificationThread, true, \
|
||||
"(Deprecated) Use Notification Thread") \
|
||||
\
|
||||
product(bool, Inline, true, \
|
||||
"Enable inlining") \
|
||||
\
|
||||
|
@ -235,13 +235,8 @@ void mutex_init() {
|
||||
|
||||
MUTEX_DEFN(Patching_lock , PaddedMutex , nosafepoint); // used for safepointing and code patching.
|
||||
MUTEX_DEFN(MonitorDeflation_lock , PaddedMonitor, nosafepoint); // used for monitor deflation thread operations
|
||||
MUTEX_DEFN(Service_lock , PaddedMonitor, service); // used for service thread operations
|
||||
|
||||
if (UseNotificationThread) {
|
||||
MUTEX_DEFN(Notification_lock , PaddedMonitor, service); // used for notification thread operations
|
||||
} else {
|
||||
Notification_lock = Service_lock;
|
||||
}
|
||||
MUTEX_DEFN(Service_lock , PaddedMonitor, service); // used for service thread operations
|
||||
MUTEX_DEFN(Notification_lock , PaddedMonitor, service); // used for notification thread operations
|
||||
|
||||
MUTEX_DEFN(JmethodIdCreation_lock , PaddedMutex , nosafepoint-2); // used for creating jmethodIDs.
|
||||
MUTEX_DEFN(InvokeMethodTypeTable_lock , PaddedMutex , safepoint);
|
||||
|
@ -81,10 +81,7 @@ static void cleanup_oopstorages() {
|
||||
|
||||
void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
|
||||
while (true) {
|
||||
bool sensors_changed = false;
|
||||
bool has_jvmti_events = false;
|
||||
bool has_gc_notification_event = false;
|
||||
bool has_dcmd_notification_event = false;
|
||||
bool stringtable_work = false;
|
||||
bool symboltable_work = false;
|
||||
bool finalizerservice_work = false;
|
||||
@ -113,10 +110,7 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
|
||||
// only the first recognized bit of work, to avoid frequently true early
|
||||
// tests from potentially starving later work. Hence the use of
|
||||
// arithmetic-or to combine results; we don't want short-circuiting.
|
||||
while (((sensors_changed = (!UseNotificationThread && LowMemoryDetector::has_pending_requests())) |
|
||||
(has_jvmti_events = _jvmti_service_queue.has_events()) |
|
||||
(has_gc_notification_event = (!UseNotificationThread && GCNotifier::has_event())) |
|
||||
(has_dcmd_notification_event = (!UseNotificationThread && DCmdFactory::has_pending_jmx_notification())) |
|
||||
while (((has_jvmti_events = _jvmti_service_queue.has_events()) |
|
||||
(stringtable_work = StringTable::has_work()) |
|
||||
(symboltable_work = SymbolTable::has_work()) |
|
||||
(finalizerservice_work = FinalizerService::has_work()) |
|
||||
@ -158,20 +152,6 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
|
||||
_jvmti_event = nullptr; // reset
|
||||
}
|
||||
|
||||
if (!UseNotificationThread) {
|
||||
if (sensors_changed) {
|
||||
LowMemoryDetector::process_sensor_changes(jt);
|
||||
}
|
||||
|
||||
if(has_gc_notification_event) {
|
||||
GCNotifier::sendNotification(CHECK);
|
||||
}
|
||||
|
||||
if(has_dcmd_notification_event) {
|
||||
DCmdFactory::send_notification(CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
if (resolved_method_table_work) {
|
||||
ResolvedMethodTable::do_concurrent_work(jt);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,8 +61,7 @@
|
||||
//
|
||||
// May need to deal with hysteresis effect.
|
||||
//
|
||||
// Memory detection code runs in the Notification thread or
|
||||
// ServiceThread depending on UseNotificationThread flag.
|
||||
// Memory detection code runs in the Notification thread.
|
||||
|
||||
class OopClosure;
|
||||
class MemoryPool;
|
||||
|
@ -149,9 +149,8 @@ void Management::init() {
|
||||
}
|
||||
|
||||
void Management::initialize(TRAPS) {
|
||||
if (UseNotificationThread) {
|
||||
NotificationThread::initialize();
|
||||
}
|
||||
NotificationThread::initialize();
|
||||
|
||||
if (ManagementServer) {
|
||||
ResourceMark rm(THREAD);
|
||||
HandleMark hm(THREAD);
|
||||
|
Loading…
Reference in New Issue
Block a user