Skip to content
Open
Show file tree
Hide file tree
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/cpu/aarch64/templateTable_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/os/posix/perfMemory_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
30 changes: 2 additions & 28 deletions src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,22 @@ static inline bool in_stack(intptr_t* ptr, JavaThread* jt) {
return jt->is_in_full_stack_checked(reinterpret_cast<address>(ptr));
}

#ifdef ASSERT
static inline bool sp_in_stack(const JfrSampleRequest& request, JavaThread* jt) {
return in_stack(static_cast<intptr_t*>(request._sample_sp), jt);
}
#endif // ASSERT

static inline bool fp_in_stack(const JfrSampleRequest& request, JavaThread* jt) {
return in_stack(static_cast<intptr_t*>(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<intptr_t*>(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<intptr_t*>(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<intptr_t*>(request._sample_bcp));
Expand All @@ -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<intptr_t*>(request._sample_bcp));
}

static inline void update_sp(JfrSampleRequest& request, int frame_size) {
assert(frame_size >= 0, "invariant");
request._sample_sp = static_cast<intptr_t*>(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<intptr_t*>(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<intptr_t*>(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");
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/jfr/support/jfrDeprecationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down