Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/hotspot/share/code/nmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,6 @@ const char* nmethod::compiler_name() const {
// Fill in default values for various flag fields
void nmethod::init_defaults() {
// avoid uninitialized fields, even for short time periods
_osr_link = nullptr;
_exception_cache = nullptr;
_gc_data = nullptr;
_oops_do_mark_link = nullptr;
Expand Down Expand Up @@ -1368,8 +1367,7 @@ nmethod::nmethod(
offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps, false),
_deoptimization_generation(0),
_method(method),
_native_receiver_sp_offset(in_ByteSize(-1)),
_native_basic_lock_sp_offset(in_ByteSize(-1))
_osr_link(nullptr)
{
assert(debug_info->oop_recorder() == code_buffer->oop_recorder(), "shared OR");
{
Expand Down
30 changes: 17 additions & 13 deletions src/hotspot/share/code/nmethod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,23 @@ class nmethod : public CodeBlob {

Method* _method;

// To support simple linked-list chaining of nmethods:
nmethod* _osr_link; // from InstanceKlass::osr_nmethods_head
// To reduce header size union fields which usages do not overlap.
union {
// To support simple linked-list chaining of nmethods:
nmethod* _osr_link; // from InstanceKlass::osr_nmethods_head
struct {
// These are used for compiled synchronized native methods to
// locate the owner and stack slot for the BasicLock. They are
// needed because there is no debug information for compiled native
// wrappers and the oop maps are insufficient to allow
// frame::retrieve_receiver() to work. Currently they are expected
// to be byte offsets from the Java stack pointer for maximum code
// sharing between platforms. JVMTI's GetLocalInstance() uses these
// offsets to find the receiver for non-static native wrapper frames.
ByteSize _native_receiver_sp_offset;
ByteSize _native_basic_lock_sp_offset;
};
};

PcDescContainer _pc_desc_container;
ExceptionCache* volatile _exception_cache;
Expand Down Expand Up @@ -241,17 +256,6 @@ class nmethod : public CodeBlob {
// pc during a deopt.
int _orig_pc_offset;

// These are used for compiled synchronized native methods to
// locate the owner and stack slot for the BasicLock. They are
// needed because there is no debug information for compiled native
// wrappers and the oop maps are insufficient to allow
// frame::retrieve_receiver() to work. Currently they are expected
// to be byte offsets from the Java stack pointer for maximum code
// sharing between platforms. JVMTI's GetLocalInstance() uses these
// offsets to find the receiver for non-static native wrapper frames.
ByteSize _native_receiver_sp_offset;
ByteSize _native_basic_lock_sp_offset;

int _compile_id; // which compilation made this nmethod
CompLevel _comp_level; // compilation level (s1)
CompilerType _compiler_type; // which compiler made this nmethod (u1)
Expand Down