Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8297864: Dead code elimination #11439

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
60c4e8c
abstract_vm_version
robehn Nov 25, 2022
e8c1337
arguments
robehn Nov 25, 2022
c424610
continuationEntry
robehn Nov 25, 2022
45ee9ed
continuationFreezeThaw
robehn Nov 25, 2022
2bcd0b2
continuationHelper
robehn Nov 25, 2022
6392e82
continuationJavaClasses
robehn Nov 25, 2022
e7a4bde
continuationWrapper
robehn Nov 25, 2022
c849173
escapeBarrier
robehn Nov 25, 2022
ed27d98
fieldDescriptor
robehn Nov 28, 2022
3f5a7a5
frame
robehn Nov 28, 2022
0923e95
handles
robehn Nov 28, 2022
cbd32e5
java
robehn Nov 28, 2022
56f161d
javaCalls
robehn Nov 28, 2022
2be43a4
deoptimization
robehn Nov 28, 2022
7290a53
javaThread
robehn Nov 28, 2022
6ed8e29
jniHandles
robehn Nov 28, 2022
6dfabec
jniPeriodicChecker
robehn Nov 28, 2022
8cb0125
keepStackGCProcessed
robehn Nov 28, 2022
0809639
monitorChunk
robehn Nov 28, 2022
40f0eff
monitorDeflationThread
robehn Nov 28, 2022
ae37f7c
mutex
robehn Nov 28, 2022
77efa2f
mutexLocker
robehn Nov 28, 2022
93a04ba
objectMonitor
robehn Nov 28, 2022
a3c6bd1
os
robehn Nov 28, 2022
2921b83
os_perf
robehn Nov 28, 2022
52fb8b6
perfData
robehn Nov 28, 2022
a9810a8
reflectionUtils
robehn Nov 28, 2022
d597de5
registerMap
robehn Nov 28, 2022
61b8806
relocator
robehn Nov 28, 2022
d4602f7
rtmLocking
robehn Nov 28, 2022
bef65cd
safepoint
robehn Nov 28, 2022
d943a7d
safepointMechanism
robehn Nov 28, 2022
3fa4ce6
sharedRuntime
robehn Nov 28, 2022
1969d46
signature
robehn Nov 29, 2022
27ef53e
stackChunkFrameStream
robehn Nov 29, 2022
c1a1c98
stackChunkFrameStream
robehn Nov 29, 2022
5a8b873
stackOverflow
robehn Nov 29, 2022
d47071a
stackValueCollection
robehn Nov 29, 2022
2ad3f47
stackWatermark
robehn Nov 29, 2022
0309ec1
stubCodeGenerator
robehn Nov 29, 2022
d04d642
stubRoutines
robehn Nov 29, 2022
830790b
suspendedThreadTask
robehn Nov 29, 2022
fd34bed
synchronizer
robehn Nov 29, 2022
313fe46
thread
robehn Nov 29, 2022
6669571
threadHeapSampler
robehn Nov 29, 2022
3908391
threads
robehn Nov 29, 2022
f6c5b0c
threadSMR
robehn Nov 29, 2022
4982220
threadStatisticalInfo
robehn Nov 29, 2022
bbc9c25
timer
robehn Nov 29, 2022
0cc7663
timerTrace
robehn Nov 29, 2022
23f3933
vframe
robehn Nov 29, 2022
4dd56f2
vframeArray
robehn Nov 29, 2022
480495e
Remove code missed in a merge
robehn Dec 1, 2022
cce07f5
Fixed whitespace nit
robehn Dec 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -196,11 +196,6 @@ inline void ThawBase::prefetch_chunk_pd(void* start, int size) {
Prefetch::read(start, size - 64);
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
intptr_t* fp = _cont.entryFP();
*(intptr_t**)(sp - frame::sender_sp_offset) = fp;
}

template <typename ConfigT>
inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
// Fast path depends on !PreserveFramePointer. See can_thaw_fast().
Expand Down
Expand Up @@ -76,12 +76,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return derelativize(frame::interpreter_frame_last_sp_offset);
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
assert_is_interpreted_and_frame_type_mixed();
return (derelativize(frame::interpreter_frame_locals_offset) + 1 >= _end) ? _end : fp() + frame::sender_sp_offset;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
assert_is_interpreted_and_frame_type_mixed();
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/cpu/arm/continuationFreezeThaw_arm.inline.hpp
Expand Up @@ -87,10 +87,6 @@ inline void ThawBase::patch_pd(frame& f, const frame& caller) {
Unimplemented();
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
Unimplemented();
}

template <typename ConfigT>
inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
Unimplemented();
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/arm/stackChunkFrameStream_arm.inline.hpp
Expand Up @@ -67,12 +67,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return NULL;
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
Unimplemented();
return NULL;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
Unimplemented();
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/ppc/stackChunkFrameStream_ppc.inline.hpp
Expand Up @@ -80,12 +80,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return derelativize(ijava_idx(esp)) + 1 - frame::metadata_words; // On PPC esp points to the next free slot
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
Unimplemented();
return NULL;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
assert_is_interpreted_and_frame_type_mixed();
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/cpu/riscv/continuationFreezeThaw_riscv.inline.hpp
Expand Up @@ -199,11 +199,6 @@ inline void ThawBase::prefetch_chunk_pd(void* start, int size) {
Prefetch::read(start, size - 64);
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
intptr_t* fp = _cont.entryFP();
*(intptr_t**)(sp - 2) = fp;
}

template <typename ConfigT>
inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
// Fast path depends on !PreserveFramePointer. See can_thaw_fast().
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/riscv/stackChunkFrameStream_riscv.inline.hpp
Expand Up @@ -76,12 +76,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return derelativize(frame::interpreter_frame_last_sp_offset);
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
assert_is_interpreted_and_frame_type_mixed();
return (derelativize(frame::interpreter_frame_locals_offset) + 1 >= _end) ? _end : fp() + frame::sender_sp_offset;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
assert_is_interpreted_and_frame_type_mixed();
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/cpu/s390/continuationFreezeThaw_s390.inline.hpp
Expand Up @@ -87,10 +87,6 @@ inline void ThawBase::patch_pd(frame& f, const frame& caller) {
Unimplemented();
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
Unimplemented();
}

template <typename ConfigT>
inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
Unimplemented();
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/s390/stackChunkFrameStream_s390.inline.hpp
Expand Up @@ -67,12 +67,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return NULL;
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
Unimplemented();
return NULL;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
Unimplemented();
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp
Expand Up @@ -199,11 +199,6 @@ inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
assert(!PreserveFramePointer, "Frame pointers need to be fixed");
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
intptr_t* fp = _cont.entryFP();
*(intptr_t**)(sp - frame::sender_sp_offset) = fp;
}

// Slow path

inline frame ThawBase::new_entry_frame() {
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/x86/stackChunkFrameStream_x86.inline.hpp
Expand Up @@ -76,12 +76,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return derelativize(frame::interpreter_frame_last_sp_offset);
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
assert_is_interpreted_and_frame_type_mixed();
return (derelativize(frame::interpreter_frame_locals_offset) + 1 >= _end) ? _end : fp() + frame::sender_sp_offset;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
assert_is_interpreted_and_frame_type_mixed();
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/cpu/zero/continuationFreezeThaw_zero.inline.hpp
Expand Up @@ -87,10 +87,6 @@ inline void ThawBase::patch_pd(frame& f, const frame& caller) {
Unimplemented();
}

void ThawBase::patch_chunk_pd(intptr_t* sp) {
Unimplemented();
}

template <typename ConfigT>
inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
Unimplemented();
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/zero/stackChunkFrameStream_zero.inline.hpp
Expand Up @@ -67,12 +67,6 @@ inline intptr_t* StackChunkFrameStream<frame_kind>::unextended_sp_for_interprete
return NULL;
}

template <ChunkFrames frame_kind>
intptr_t* StackChunkFrameStream<frame_kind>::next_sp_for_interpreter_frame() const {
Unimplemented();
return NULL;
}

template <ChunkFrames frame_kind>
inline void StackChunkFrameStream<frame_kind>::next_for_interpreter_frame() {
Unimplemented();
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/zero/stubGenerator_zero.cpp
Expand Up @@ -191,12 +191,9 @@ class StubGenerator: public StubCodeGenerator {

// atomic calls
StubRoutines::_atomic_xchg_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_xchg_long_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_cmpxchg_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_cmpxchg_byte_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_cmpxchg_long_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_add_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_add_long_entry = ShouldNotCallThisStub();
StubRoutines::_fence_entry = ShouldNotCallThisStub();
}

Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/prims/forte.cpp
Expand Up @@ -606,9 +606,6 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
return;
}

// !important! make sure all to call thread->set_in_asgct(false) before every return
thread->set_in_asgct(true);

switch (thread->thread_state()) {
case _thread_new:
case _thread_uninitialized:
Expand Down Expand Up @@ -666,7 +663,6 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
trace->num_frames = ticks_unknown_state; // -7
break;
}
thread->set_in_asgct(false);
}


Expand Down
11 changes: 0 additions & 11 deletions src/hotspot/share/runtime/abstract_vm_version.cpp
Expand Up @@ -161,13 +161,6 @@ const char* Abstract_VM_Version::vm_release() {
return VM_RELEASE;
}

// NOTE: do *not* use stringStream. this function is called by
// fatal error handlers. if the crash is in native thread,
// stringStream cannot get resource allocated and will SEGV.
const char* Abstract_VM_Version::jre_release_version() {
return VERSION_STRING;
}

#define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \
AIX_ONLY("aix") \
Expand Down Expand Up @@ -281,10 +274,6 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
: VMNAME " (" DEBUG_LEVEL " " INTERNAL_VERSION_SUFFIX;
}

const char *Abstract_VM_Version::vm_build_user() {
return HOTSPOT_BUILD_USER;
}

const char *Abstract_VM_Version::jdk_debug_level() {
return DEBUG_LEVEL;
}
Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/share/runtime/abstract_vm_version.hpp
Expand Up @@ -102,7 +102,6 @@ class Abstract_VM_Version: AllStatic {
static const char* vm_info_string();
static const char* vm_release();
static const char* vm_platform_string();
static const char* vm_build_user();

static int vm_major_version() { return _vm_major_version; }
static int vm_minor_version() { return _vm_minor_version; }
Expand All @@ -115,7 +114,6 @@ class Abstract_VM_Version: AllStatic {

// Internal version providing additional build information
static const char* internal_vm_info_string();
static const char* jre_release_version();
static const char* jdk_debug_level();
static const char* printable_jdk_debug_level();

Expand Down Expand Up @@ -166,12 +164,6 @@ class Abstract_VM_Version: AllStatic {
return _data_cache_line_flush_size != 0;
}

// Number of page sizes efficiently supported by the hardware. Most chips now
// support two sizes, thus this default implementation. Processor-specific
// subclasses should define new versions to hide this one as needed. Note
// that the O/S may support more sizes, but at most this many are used.
static uint page_size_count() { return 2; }

// Denominator for computing default ParallelGCThreads for machines with
// a large number of cores.
static uint parallel_worker_threads_denominator() { return 8; }
Expand Down
32 changes: 0 additions & 32 deletions src/hotspot/share/runtime/arguments.cpp
Expand Up @@ -4163,38 +4163,6 @@ const char* Arguments::PropertyList_get_readable_value(SystemProperty *pl, const
return NULL;
}

const char* Arguments::PropertyList_get_key_at(SystemProperty *pl, int index) {
int count = 0;
const char* ret_val = NULL;

while(pl != NULL) {
if(count >= index) {
ret_val = pl->key();
break;
}
count++;
pl = pl->next();
}

return ret_val;
}

char* Arguments::PropertyList_get_value_at(SystemProperty* pl, int index) {
int count = 0;
char* ret_val = NULL;

while(pl != NULL) {
if(count >= index) {
ret_val = pl->value();
break;
}
count++;
pl = pl->next();
}

return ret_val;
}

void Arguments::PropertyList_add(SystemProperty** plist, SystemProperty *new_p) {
SystemProperty* p = *plist;
if (p == NULL) {
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/share/runtime/arguments.hpp
Expand Up @@ -86,7 +86,6 @@ class ModulePatchPath : public CHeapObj<mtInternal> {
ModulePatchPath(const char* module_name, const char* path);
~ModulePatchPath();

inline void set_path(const char* path) { _path->set_value(path); }
inline const char* module_name() const { return _module_name; }
inline char* path_string() const { return _path->value(); }
};
Expand Down Expand Up @@ -174,7 +173,6 @@ class AgentLibrary : public CHeapObj<mtArguments> {
void set_static_lib(bool is_static_lib) { _is_static_lib = is_static_lib; }
bool valid() { return (_state == agent_valid); }
void set_valid() { _state = agent_valid; }
void set_invalid() { _state = agent_invalid; }

// Constructor
AgentLibrary(const char* name, const char* options, bool is_absolute_path,
Expand Down Expand Up @@ -592,8 +590,6 @@ class Arguments : AllStatic {
static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
static int PropertyList_count(SystemProperty* pl);
static int PropertyList_readable_count(SystemProperty* pl);
static const char* PropertyList_get_key_at(SystemProperty* pl,int index);
static char* PropertyList_get_value_at(SystemProperty* pl,int index);

static bool is_internal_module_property(const char* option);

Expand All @@ -618,12 +614,10 @@ class Arguments : AllStatic {

static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
static char* get_boot_class_path() { return _boot_class_path->value(); }
static char* get_jdk_boot_class_path_append() { return _jdk_boot_class_path_append->value(); }
static bool has_jimage() { return _has_jimage; }

static char* get_java_home() { return _java_home->value(); }
static char* get_dll_dir() { return _sun_boot_library_path->value(); }
static char* get_ext_dirs() { return _ext_dirs; }
static char* get_appclasspath() { return _java_class_path->value(); }
static void fix_appclasspath();

Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/runtime/continuationEntry.hpp
Expand Up @@ -103,8 +103,6 @@ class ContinuationEntry {
static address compiled_entry();
static address interpreted_entry();

static CompiledMethod* enter_special() { return _enter_special; }

int argsize() const { return _argsize; }
void set_argsize(int value) { _argsize = value; }

Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/runtime/continuationFreezeThaw.cpp
Expand Up @@ -388,7 +388,6 @@ class FreezeBase : public StackObj {

protected:
inline void init_rest();
void freeze_fast_init_cont_data(intptr_t* frame_sp);
void throw_stack_overflow_on_humongous_chunk();

// fast path
Expand Down Expand Up @@ -1721,7 +1720,6 @@ class ThawBase : public StackObj {
// fast path
inline void prefetch_chunk_pd(void* start, int size_words);
void patch_return(intptr_t* sp, bool is_last);
void patch_chunk_pd(intptr_t* sp); // TODO remove

// slow path
NOINLINE intptr_t* thaw_slow(stackChunkOop chunk, bool return_barrier);
Expand Down Expand Up @@ -1803,8 +1801,6 @@ class ReconstructedStack : public StackObj {
assert(_base - 1 <= top() + total_size() + frame::metadata_words_at_bottom, "missed entry frame");
}

int thaw_size() const { return _thaw_size; }
int argsize() const { return _argsize; }
int entry_frame_extension() const { return _argsize + (_argsize > 0 ? frame::metadata_words_at_top : 0); }

// top and bottom stack pointers
Expand Down Expand Up @@ -1865,7 +1861,6 @@ void ThawBase::patch_return(intptr_t* sp, bool is_last) {

address pc = !is_last ? StubRoutines::cont_returnBarrier() : _cont.entryPC();
*(address*)(sp - frame::sender_sp_ret_address_offset()) = pc;
// patch_chunk_pd(sp); -- TODO: If not needed - remove method; it's not used elsewhere
}

template <typename ConfigT>
Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/share/runtime/continuationHelper.hpp
Expand Up @@ -75,10 +75,6 @@ class ContinuationHelper::Frame : public AllStatic {
static inline intptr_t* frame_top(const frame &f);
static inline bool is_deopt_return(address pc, const frame& sender);
static bool assert_frame_laid_out(frame f);

static char* method_name(Method* m) { return m != nullptr ? m->name_and_sig_as_C_string() : nullptr; }
static Method* top_java_frame_method(const frame& f);
static Method* bottom_java_frame_method(const frame& f) { return frame_method(f); }
#endif
};

Expand All @@ -97,7 +93,6 @@ class ContinuationHelper::InterpretedFrame : public ContinuationHelper::Frame {
static address return_pc(const frame& f);
static void patch_sender_sp(frame& f, const frame& caller);

static int size(const frame& f, InterpreterOopMap* mask);
static int size(const frame& f);
static inline int expression_stack_size(const frame &f, InterpreterOopMap* mask);

Expand All @@ -118,7 +113,6 @@ class ContinuationHelper::NonInterpretedFrame : public ContinuationHelper::Frame

static inline int size(const frame& f);
static inline int stack_argsize(const frame& f);
static inline int num_oops(const frame& f);
};

class ContinuationHelper::NonInterpretedUnknownFrame : public ContinuationHelper::NonInterpretedFrame {
Expand All @@ -128,8 +122,6 @@ class ContinuationHelper::NonInterpretedUnknownFrame : public ContinuationHelper

class ContinuationHelper::CompiledFrame : public ContinuationHelper::NonInterpretedFrame {
public:
static inline int num_oops(const frame& f);

static bool is_instance(const frame& f);

#ifdef ASSERT
Expand Down