Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
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
2 changes: 0 additions & 2 deletions src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
void clear(void) {
// clearing _last_Java_sp must be first
_last_Java_sp = nullptr;
OrderAccess::release();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need a compiler fence here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not, if this is the same thread as readers. I don't know what it's for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OrderAccess::release() is more than a compiler barrier on AArch64. I am guessing this was copied from x86 or one of the others where that same function is a compiler barrier? Should I move compiler_barrier from the random source files its in, into globalDefinitions, and use that?

_last_Java_fp = nullptr;
_last_Java_pc = nullptr;
}
Expand All @@ -56,7 +55,6 @@
//
if (_last_Java_sp != src->_last_Java_sp) {
_last_Java_sp = nullptr;
OrderAccess::release();
}
_last_Java_fp = src->_last_Java_fp;
_last_Java_pc = src->_last_Java_pc;
Expand Down
5 changes: 3 additions & 2 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,13 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
last_java_sp = esp;
}

str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset()));

// last_java_fp is optional
if (last_java_fp->is_valid()) {
str(last_java_fp, Address(rthread, JavaThread::last_Java_fp_offset()));
}

// Must be last so profiler will always see valid frame if has_last_frame() is true
str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset()));
}

void MacroAssembler::set_last_Java_frame(Register last_java_sp,
Expand Down