8225788: Dead code in thread and safepoint

Reviewed-by: dholmes, dcubed, coleenp
This commit is contained in:
Robbin Ehn 2019-08-15 09:06:42 +02:00
parent 6af89d6412
commit 57dbffe53f
9 changed files with 7 additions and 186 deletions

View file

@ -705,7 +705,6 @@ protected:
// Support for stack overflow handling, get_thread, etc.
address _stack_base;
size_t _stack_size;
uintptr_t _self_raw_id; // used by get_thread (mutable)
int _lgrp_id;
volatile void** polling_page_addr() { return &_polling_page; }
@ -725,9 +724,6 @@ protected:
return (_stack_base >= adr && adr >= stack_end());
}
uintptr_t self_raw_id() { return _self_raw_id; }
void set_self_raw_id(uintptr_t value) { _self_raw_id = value; }
int lgrp_id() const { return _lgrp_id; }
void set_lgrp_id(int value) { _lgrp_id = value; }
@ -753,7 +749,6 @@ protected:
void print_owned_locks() const { print_owned_locks_on(tty); }
Monitor* owned_locks() const { return _owned_locks; }
bool owns_locks() const { return owned_locks() != NULL; }
bool owns_locks_but_compiled_lock() const;
// Deadlock detection
ResourceMark* current_resource_mark() { return _current_resource_mark; }
@ -1021,8 +1016,6 @@ class JavaThread: public Thread {
// Deopt support
DeoptResourceMark* _deopt_mark; // Holds special ResourceMark for deoptimization
intptr_t* _must_deopt_id; // id of frame that needs to be deopted once we
// transition out of native
CompiledMethod* _deopt_nmethod; // CompiledMethod that is currently being deoptimized
vframeArray* _vframe_array_head; // Holds the heap of the active vframeArrays
vframeArray* _vframe_array_last; // Holds last vFrameArray we popped
@ -1199,17 +1192,6 @@ class JavaThread: public Thread {
// failed reallocations.
int _frames_to_pop_failed_realloc;
#ifndef PRODUCT
int _jmp_ring_index;
struct {
// We use intptr_t instead of address so debugger doesn't try and display strings
intptr_t _target;
intptr_t _instruction;
const char* _file;
int _line;
} _jmp_ring[jump_ring_buffer_size];
#endif // PRODUCT
friend class VMThread;
friend class ThreadWaitTransition;
friend class VM_Exit;
@ -1264,8 +1246,6 @@ class JavaThread: public Thread {
oop threadObj() const { return _threadObj; }
void set_threadObj(oop p) { _threadObj = p; }
ThreadPriority java_priority() const; // Read from threadObj()
// Prepare thread and add to priority queue. If a priority is
// not specified, use the priority of the thread object. Threads_lock
// must be held while this function is called.
@ -1521,10 +1501,6 @@ class JavaThread: public Thread {
void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; }
DeoptResourceMark* deopt_mark(void) { return _deopt_mark; }
intptr_t* must_deopt_id() { return _must_deopt_id; }
void set_must_deopt_id(intptr_t* id) { _must_deopt_id = id; }
void clear_must_deopt_id() { _must_deopt_id = NULL; }
void set_deopt_compiled_method(CompiledMethod* nm) { _deopt_nmethod = nm; }
CompiledMethod* deopt_compiled_method() { return _deopt_nmethod; }
@ -1752,16 +1728,8 @@ class JavaThread: public Thread {
void clr_do_not_unlock(void) { _do_not_unlock_if_synchronized = false; }
bool do_not_unlock(void) { return _do_not_unlock_if_synchronized; }
#ifndef PRODUCT
void record_jump(address target, address instr, const char* file, int line);
#endif // PRODUCT
// For assembly stub generation
static ByteSize threadObj_offset() { return byte_offset_of(JavaThread, _threadObj); }
#ifndef PRODUCT
static ByteSize jmp_ring_index_offset() { return byte_offset_of(JavaThread, _jmp_ring_index); }
static ByteSize jmp_ring_offset() { return byte_offset_of(JavaThread, _jmp_ring); }
#endif // PRODUCT
static ByteSize jni_environment_offset() { return byte_offset_of(JavaThread, _jni_environment); }
static ByteSize pending_jni_exception_check_fn_offset() {
return byte_offset_of(JavaThread, _pending_jni_exception_check_fn);
@ -1884,9 +1852,7 @@ class JavaThread: public Thread {
void print_on(outputStream* st, bool print_extended_info) const;
void print_on(outputStream* st) const { print_on(st, false); }
void print() const;
void print_value();
void print_thread_state_on(outputStream*) const PRODUCT_RETURN;
void print_thread_state() const PRODUCT_RETURN;
void print_on_error(outputStream* st, char* buf, int buflen) const;
void print_name_on_error(outputStream* st, char* buf, int buflen) const;
void verify();
@ -1895,9 +1861,6 @@ class JavaThread: public Thread {
// factor out low-level mechanics for use in both normal and error cases
virtual const char* get_thread_name_string(char* buf = NULL, int buflen = 0) const;
public:
const char* get_threadgroup_name() const;
const char* get_parent_name() const;
// Accessing frames
frame last_frame() {
_anchor.make_walkable(this);
@ -1917,7 +1880,6 @@ class JavaThread: public Thread {
void trace_stack() PRODUCT_RETURN;
void trace_stack_from(vframe* start_vf) PRODUCT_RETURN;
void trace_frames() PRODUCT_RETURN;
void trace_oops() PRODUCT_RETURN;
// Print an annotated view of the stack frames
void print_frame_layout(int depth = 0, bool validate_only = false) NOT_DEBUG_RETURN;
@ -1925,9 +1887,6 @@ class JavaThread: public Thread {
print_frame_layout(0, true);
}
// Returns the number of stack frames on the stack
int depth() const;
// Function for testing deoptimization
void deoptimize();
void make_zombies();
@ -2071,18 +2030,6 @@ class JavaThread: public Thread {
// Machine dependent stuff
#include OS_CPU_HEADER(thread)
public:
void set_blocked_on_compilation(bool value) {
_blocked_on_compilation = value;
}
bool blocked_on_compilation() {
return _blocked_on_compilation;
}
protected:
bool _blocked_on_compilation;
// JSR166 per-thread parker
private:
Parker* _parker;
@ -2283,13 +2230,6 @@ class Threads: AllStatic {
// This version may be called by sequential or parallel code.
static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf);
// Apply "f->do_oop" to roots in all threads that
// are part of compiled frames
static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
static void convert_hcode_pointers();
static void restore_hcode_pointers();
// Sweeper
static void nmethods_do(CodeBlobClosure* cf);