diff --git a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp index cb588adb6c6..60c4f34d7c1 100644 --- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp @@ -96,10 +96,6 @@ static inline Address aaddress(Register r) { return iaddress(r); } -static inline Address at_rsp() { - return Address(esp, 0); -} - // At top of Java expression stack which may be different than esp(). It // isn't for category 1 objects. static inline Address at_tos () { diff --git a/src/hotspot/os/posix/perfMemory_posix.cpp b/src/hotspot/os/posix/perfMemory_posix.cpp index 3deb7efeb9b..7aab84c05a7 100644 --- a/src/hotspot/os/posix/perfMemory_posix.cpp +++ b/src/hotspot/os/posix/perfMemory_posix.cpp @@ -488,6 +488,7 @@ static char* get_user_name(uid_t uid) { return user_name; } +#ifndef __APPLE__ // return the name of the user that owns the process identified by vmid. // // This method uses a slow directory search algorithm to find the backing @@ -651,6 +652,7 @@ static char* get_user_name(int vmid, int *nspid, TRAPS) { #endif return result; } +#endif // return the file name of the backing store file for the named // shared memory region for the given user name and vmid. diff --git a/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp b/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp index 7049df0198b..68a47193e55 100644 --- a/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp +++ b/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp @@ -58,29 +58,22 @@ static inline bool in_stack(intptr_t* ptr, JavaThread* jt) { return jt->is_in_full_stack_checked(reinterpret_cast
(ptr)); } +#ifdef ASSERT static inline bool sp_in_stack(const JfrSampleRequest& request, JavaThread* jt) { return in_stack(static_cast(request._sample_sp), jt); } +#endif // ASSERT static inline bool fp_in_stack(const JfrSampleRequest& request, JavaThread* jt) { return in_stack(static_cast(request._sample_bcp), jt); } -static inline void update_interpreter_frame_sender_pc(JfrSampleRequest& request, intptr_t* fp) { - request._sample_pc = frame::interpreter_return_address(fp); -} - static inline void update_interpreter_frame_pc(JfrSampleRequest& request, JavaThread* jt) { assert(fp_in_stack(request, jt), "invariant"); assert(is_interpreter(request), "invariant"); request._sample_pc = frame::interpreter_return_address(static_cast(request._sample_bcp)); } -static inline address interpreter_frame_return_address(const JfrSampleRequest& request) { - assert(is_interpreter(request), "invariant"); - return frame::interpreter_return_address(static_cast(request._sample_bcp)); -} - static inline intptr_t* frame_sender_sp(const JfrSampleRequest& request, JavaThread* jt) { assert(fp_in_stack(request, jt), "invariant"); return frame::sender_sp(static_cast(request._sample_bcp)); @@ -90,29 +83,10 @@ static inline void update_frame_sender_sp(JfrSampleRequest& request, JavaThread* request._sample_sp = frame_sender_sp(request, jt); } -static inline void update_frame_sender_sp(JfrSampleRequest& request, intptr_t* fp) { - request._sample_sp = frame::sender_sp(fp); -} - static inline intptr_t* frame_link(const JfrSampleRequest& request) { return frame::link(static_cast(request._sample_bcp)); } -static inline void update_sp(JfrSampleRequest& request, int frame_size) { - assert(frame_size >= 0, "invariant"); - request._sample_sp = static_cast(request._sample_sp) + frame_size; -} - -static inline void update_pc(JfrSampleRequest& request) { - assert(request._sample_sp != nullptr, "invariant"); - request._sample_pc = frame::return_address(static_cast(request._sample_sp)); -} - -static inline void update_fp(JfrSampleRequest& request) { - assert(request._sample_sp != nullptr, "invariant"); - request._sample_bcp = is_interpreter(request) ? frame::fp(static_cast(request._sample_sp)) : nullptr; -} - // Less extensive sanity checks for an interpreter frame. static bool is_valid_interpreter_frame(const JfrSampleRequest& request, JavaThread* jt) { assert(sp_in_stack(request, jt), "invariant"); diff --git a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp index 534c9996cfe..7c0f8c02e69 100644 --- a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp +++ b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp @@ -66,10 +66,6 @@ static inline void send_safepoint_latency_event(const JfrSampleRequest& request, } } -static inline bool is_interpreter(address pc) { - return Interpreter::contains(pc); -} - static inline bool is_interpreter(const JfrSampleRequest& request) { return request._sample_bcp != nullptr; } diff --git a/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp b/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp index b0f4461a82c..2dbe0f96b24 100644 --- a/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp +++ b/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp @@ -176,6 +176,7 @@ static inline bool is_global(ConstBufferPtr buffer) { return buffer->context() == JFR_GLOBAL; } +#ifdef ASSERT static inline bool is_thread_local(ConstBufferPtr buffer) { assert(buffer != nullptr, "invariant"); return buffer->context() == JFR_THREADLOCAL; @@ -185,6 +186,7 @@ static inline bool is_virtual_thread_local(ConstBufferPtr buffer) { assert(buffer != nullptr, "invariant"); return buffer->context() == JFR_VIRTUAL_THREADLOCAL; } +#endif // ASSERT BufferPtr JfrCheckpointManager::lease_global(Thread* thread, bool previous_epoch /* false */, size_t size /* 0 */) { JfrCheckpointMspace* const mspace = instance()._global_mspace; diff --git a/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp b/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp index 8fc35ca8dc1..de38d9cb5b4 100644 --- a/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp +++ b/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp @@ -195,9 +195,11 @@ static inline bool is_not_jdk_module(const ModuleEntry* module, JavaThread* jt) return !is_jdk_module(module, jt); } +#ifdef ASSERT static inline bool jfr_is_started_on_command_line() { return JfrRecorder::is_started_on_commandline(); } +#endif // ASSERT static bool should_record(const Method* method, const Method* sender, JavaThread* jt) { assert(method != nullptr, "invariant");