@@ -223,7 +223,6 @@ Thread::Thread() {
223
223
// stack and get_thread
224
224
set_stack_base (NULL );
225
225
set_stack_size (0 );
226
- set_self_raw_id (0 );
227
226
set_lgrp_id (-1 );
228
227
DEBUG_ONLY (clear_suspendible_thread ();)
229
228
@@ -859,23 +858,6 @@ JavaThread::is_thread_fully_suspended(bool wait_for_suspend, uint32_t *bits) {
859
858
return true ;
860
859
}
861
860
862
- #ifndef PRODUCT
863
- void JavaThread::record_jump (address target, address instr, const char * file,
864
- int line) {
865
-
866
- // This should not need to be atomic as the only way for simultaneous
867
- // updates is via interrupts. Even then this should be rare or non-existent
868
- // and we don't care that much anyway.
869
-
870
- int index = _jmp_ring_index;
871
- _jmp_ring_index = (index + 1 ) & (jump_ring_buffer_size - 1 );
872
- _jmp_ring[index]._target = (intptr_t ) target;
873
- _jmp_ring[index]._instruction = (intptr_t ) instr;
874
- _jmp_ring[index]._file = file;
875
- _jmp_ring[index]._line = line;
876
- }
877
- #endif // PRODUCT
878
-
879
861
void Thread::interrupt (Thread* thread) {
880
862
debug_only (check_for_dangling_thread_pointer (thread);)
881
863
os::interrupt (thread);
@@ -1001,15 +983,6 @@ void Thread::print_owned_locks_on(outputStream* st) const {
1001
983
}
1002
984
}
1003
985
1004
- static int ref_use_count = 0 ;
1005
-
1006
- bool Thread::owns_locks_but_compiled_lock () const {
1007
- for (Monitor *cur = _owned_locks; cur; cur = cur->next ()) {
1008
- if (cur != Compile_lock) return true ;
1009
- }
1010
- return false ;
1011
- }
1012
-
1013
986
// Checks safepoint allowed and clears unhandled oops at potential safepoints.
1014
987
void Thread::check_possible_safepoint () {
1015
988
if (!is_Java_thread ()) return ;
@@ -1688,7 +1661,6 @@ void JavaThread::initialize() {
1688
1661
set_deferred_locals (NULL );
1689
1662
set_deopt_mark (NULL );
1690
1663
set_deopt_compiled_method (NULL );
1691
- clear_must_deopt_id ();
1692
1664
set_monitor_chunks (NULL );
1693
1665
_on_thread_list = false ;
1694
1666
set_thread_state (_thread_new);
@@ -1723,20 +1695,12 @@ void JavaThread::initialize() {
1723
1695
_pending_async_exception = NULL ;
1724
1696
_thread_stat = NULL ;
1725
1697
_thread_stat = new ThreadStatistics ();
1726
- _blocked_on_compilation = false ;
1727
1698
_jni_active_critical = 0 ;
1728
1699
_pending_jni_exception_check_fn = NULL ;
1729
1700
_do_not_unlock_if_synchronized = false ;
1730
1701
_cached_monitor_info = NULL ;
1731
1702
_parker = Parker::Allocate (this );
1732
1703
1733
- #ifndef PRODUCT
1734
- _jmp_ring_index = 0 ;
1735
- for (int ji = 0 ; ji < jump_ring_buffer_size; ji++) {
1736
- record_jump (NULL , NULL , NULL , 0 );
1737
- }
1738
- #endif // PRODUCT
1739
-
1740
1704
// Setup safepoint state info for this thread
1741
1705
ThreadSafepointState::create (this );
1742
1706
@@ -3048,9 +3012,6 @@ const char* _get_thread_state_name(JavaThreadState _thread_state) {
3048
3012
void JavaThread::print_thread_state_on (outputStream *st) const {
3049
3013
st->print_cr (" JavaThread state: %s" , _get_thread_state_name (_thread_state));
3050
3014
};
3051
- void JavaThread::print_thread_state () const {
3052
- print_thread_state_on (tty);
3053
- }
3054
3015
#endif // PRODUCT
3055
3016
3056
3017
// Called by Threads::print() for VM_PrintThreads operation
@@ -3171,47 +3132,10 @@ const char* JavaThread::get_thread_name_string(char* buf, int buflen) const {
3171
3132
return name_str;
3172
3133
}
3173
3134
3174
-
3175
- const char * JavaThread::get_threadgroup_name () const {
3176
- debug_only (if (JavaThread::current () != this ) assert_locked_or_safepoint (Threads_lock);)
3177
- oop thread_obj = threadObj ();
3178
- if (thread_obj != NULL ) {
3179
- oop thread_group = java_lang_Thread::threadGroup (thread_obj);
3180
- if (thread_group != NULL ) {
3181
- // ThreadGroup.name can be null
3182
- return java_lang_ThreadGroup::name (thread_group);
3183
- }
3184
- }
3185
- return NULL ;
3186
- }
3187
-
3188
- const char * JavaThread::get_parent_name () const {
3189
- debug_only (if (JavaThread::current () != this ) assert_locked_or_safepoint (Threads_lock);)
3190
- oop thread_obj = threadObj ();
3191
- if (thread_obj != NULL ) {
3192
- oop thread_group = java_lang_Thread::threadGroup (thread_obj);
3193
- if (thread_group != NULL ) {
3194
- oop parent = java_lang_ThreadGroup::parent (thread_group);
3195
- if (parent != NULL ) {
3196
- // ThreadGroup.name can be null
3197
- return java_lang_ThreadGroup::name (parent);
3198
- }
3199
- }
3200
- }
3201
- return NULL ;
3202
- }
3203
-
3204
- ThreadPriority JavaThread::java_priority () const {
3205
- oop thr_oop = threadObj ();
3206
- if (thr_oop == NULL ) return NormPriority; // Bootstrapping
3207
- ThreadPriority priority = java_lang_Thread::priority (thr_oop);
3208
- assert (MinPriority <= priority && priority <= MaxPriority, " sanity check" );
3209
- return priority;
3210
- }
3211
-
3212
3135
void JavaThread::prepare (jobject jni_thread, ThreadPriority prio) {
3213
3136
3214
3137
assert (Threads_lock->owner () == Thread::current (), " must have threads lock" );
3138
+ assert (NoPriority <= prio && prio <= MaxPriority, " sanity check" );
3215
3139
// Link Java Thread object <-> C++ Thread
3216
3140
3217
3141
// Get the C++ thread object (an oop) from the JNI handle (a jthread)
@@ -3351,23 +3275,6 @@ class PrintAndVerifyOopClosure: public OopClosure {
3351
3275
virtual void do_oop (narrowOop* p) { do_oop_work (p); }
3352
3276
};
3353
3277
3354
-
3355
- static void oops_print (frame* f, const RegisterMap *map) {
3356
- PrintAndVerifyOopClosure print;
3357
- f->print_value ();
3358
- f->oops_do (&print, NULL , (RegisterMap*)map);
3359
- }
3360
-
3361
- // Print our all the locations that contain oops and whether they are
3362
- // valid or not. This useful when trying to find the oldest frame
3363
- // where an oop has gone bad since the frame walk is from youngest to
3364
- // oldest.
3365
- void JavaThread::trace_oops () {
3366
- tty->print_cr (" [Trace oops]" );
3367
- frames_do (oops_print);
3368
- }
3369
-
3370
-
3371
3278
#ifdef ASSERT
3372
3279
// Print or validate the layout of stack frames
3373
3280
void JavaThread::print_frame_layout (int depth, bool validate_only) {
0 commit comments