Skip to content

8302736: Major performance regression in Math.log on aarch64 #1588

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

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
4 changes: 0 additions & 4 deletions src/hotspot/share/opto/runtime.cpp
Original file line number Diff line number Diff line change
@@ -1431,10 +1431,6 @@ address OptoRuntime::handle_exception_C(JavaThread* current) {
// *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
//
address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {

// Enable WXWrite: the function called directly by compiled code.
MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread));

// The frame we rethrow the exception to might not have been processed by the GC yet.
// The stack watermark barrier takes care of detecting that and ensuring the frame
// has updated oops.
2 changes: 0 additions & 2 deletions src/hotspot/share/runtime/interfaceSupport.inline.hpp
Original file line number Diff line number Diff line change
@@ -325,8 +325,6 @@ class VMNativeEntryWrapper {

#define VM_LEAF_BASE(result_type, header) \
debug_only(NoHandleMark __hm;) \
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, \
JavaThread::current())); \
os::verify_stack_alignment(); \
/* begin of body */

6 changes: 6 additions & 0 deletions src/hotspot/share/runtime/sharedRuntime.cpp
Original file line number Diff line number Diff line change
@@ -475,6 +475,9 @@ address SharedRuntime::raw_exception_handler_for_return_address(JavaThread* curr
current->set_exception_pc(NULL);
#endif // INCLUDE_JVMCI

// write lock needed because we might update the pc desc cache via PcDescCache::add_pc_desc
MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, current));

// The fastest case first
CodeBlob* blob = CodeCache::find_blob(return_address);
CompiledMethod* nm = (blob != NULL) ? blob->as_compiled_method_or_null() : NULL;
@@ -1964,6 +1967,9 @@ JRT_LEAF(void, SharedRuntime::fixup_callers_callsite(Method* method, address cal
return;
}

// write lock needed because we might update the pc desc cache via PcDescCache::add_pc_desc
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, JavaThread::current()));

CodeBlob* cb = CodeCache::find_blob(caller_pc);
if (cb == NULL || !cb->is_compiled() || callee->is_unloading()) {
return;