-
Bug
-
Resolution: Fixed
-
P4
-
10
-
b36
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8193749 | 11 | Daniel Daugherty | P4 | Resolved | Fixed | team |
A comment from Stefan K during the code review of JDK-8167108:
6) I think it would be nice if the SMR stuff in thread.hpp were encapsulated into an class instead of added directly to Thread and Threads. I sort-of expected the SMR variables to be moved to threadSMR.hpp.
For example:
class Threads: AllStatic {
friend class VMStructs;
private:
+ // Safe Memory Reclamation (SMR) support:
+ static Monitor* _smr_delete_lock;
+ // The '_cnt', '_max' and '_times" fields are enabled via
+ // -XX:+EnableThreadSMRStatistics:
+ static uint _smr_delete_lock_wait_cnt;
+ static uint _smr_delete_lock_wait_max;
+ static volatile int _smr_delete_notify;
+ static volatile jint _smr_deleted_thread_cnt;
+ static volatile jint _smr_deleted_thread_time_max;
+ static volatile jint _smr_deleted_thread_times;
+ static ThreadsList* volatile _smr_java_thread_list;
+ static ThreadsList* get_smr_java_thread_list() {
+ return (ThreadsList*)OrderAccess::load_ptr_acquire((void* volatile*)&_smr_java_thread_list);
+ }
+ static ThreadsList* xchg_smr_java_thread_list(ThreadsList* new_list) {
+ return (ThreadsList*)Atomic::xchg_ptr((void*)new_list, (volatile void*)&_smr_java_thread_list);
+ }
+ static long _smr_java_thread_list_alloc_cnt;
+ static long _smr_java_thread_list_free_cnt;
+ static uint _smr_java_thread_list_max;
+ static uint _smr_nested_thread_list_max;
+ static volatile jint _smr_tlh_cnt;
+ static volatile jint _smr_tlh_time_max;
+ static volatile jint _smr_tlh_times;
+ static ThreadsList* _smr_to_delete_list;
+ static uint _smr_to_delete_list_cnt;
+ static uint _smr_to_delete_list_max;
Could be:
class Threads: AllStatic {
friend class VMStructs;
private:
// Safe Memory Reclamation (SMR) support:
SMRSupport _smr_support;
And SMRSupport could be moved to threadSMR.hpp.
6) I think it would be nice if the SMR stuff in thread.hpp were encapsulated into an class instead of added directly to Thread and Threads. I sort-of expected the SMR variables to be moved to threadSMR.hpp.
For example:
class Threads: AllStatic {
friend class VMStructs;
private:
+ // Safe Memory Reclamation (SMR) support:
+ static Monitor* _smr_delete_lock;
+ // The '_cnt', '_max' and '_times" fields are enabled via
+ // -XX:+EnableThreadSMRStatistics:
+ static uint _smr_delete_lock_wait_cnt;
+ static uint _smr_delete_lock_wait_max;
+ static volatile int _smr_delete_notify;
+ static volatile jint _smr_deleted_thread_cnt;
+ static volatile jint _smr_deleted_thread_time_max;
+ static volatile jint _smr_deleted_thread_times;
+ static ThreadsList* volatile _smr_java_thread_list;
+ static ThreadsList* get_smr_java_thread_list() {
+ return (ThreadsList*)OrderAccess::load_ptr_acquire((void* volatile*)&_smr_java_thread_list);
+ }
+ static ThreadsList* xchg_smr_java_thread_list(ThreadsList* new_list) {
+ return (ThreadsList*)Atomic::xchg_ptr((void*)new_list, (volatile void*)&_smr_java_thread_list);
+ }
+ static long _smr_java_thread_list_alloc_cnt;
+ static long _smr_java_thread_list_free_cnt;
+ static uint _smr_java_thread_list_max;
+ static uint _smr_nested_thread_list_max;
+ static volatile jint _smr_tlh_cnt;
+ static volatile jint _smr_tlh_time_max;
+ static volatile jint _smr_tlh_times;
+ static ThreadsList* _smr_to_delete_list;
+ static uint _smr_to_delete_list_cnt;
+ static uint _smr_to_delete_list_max;
Could be:
class Threads: AllStatic {
friend class VMStructs;
private:
// Safe Memory Reclamation (SMR) support:
SMRSupport _smr_support;
And SMRSupport could be moved to threadSMR.hpp.
- backported by
-
JDK-8193749 migrate more Thread-SMR stuff from thread.[ch]pp -> threadSMR.[ch]pp
-
- Resolved
-
- relates to
-
JDK-8193135 get rid of redundant _smr_ prefix/infix in ThreadSMRSupport stuff
-
- Resolved
-
-
JDK-8167108 inconsistent handling of SR_lock can lead to crashes
-
- Resolved
-