Skip to content

[lworld] Remove redundant DTraceAlloc/Method probes #1521

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
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: 2 additions & 2 deletions src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ void InterpreterMacroAssembler::allocate_instance(Register klass, Register new_o
Register t1, Register t2,
bool clear_fields, Label& alloc_failed) {
MacroAssembler::allocate_instance(klass, new_obj, t1, t2, clear_fields, alloc_failed);
if (DTraceMethodProbes) {
// Trigger dtrace event for fastpath
if (DTraceAllocProbes) {
// Trigger dtrace event for fastpath
push(atos);
call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), new_obj);
pop(atos);
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5798,8 +5798,6 @@ void MacroAssembler::allocate_instance(Register klass, Register new_obj,
mov(t2, klass); // preserve klass
store_klass(new_obj, t2); // src klass reg is potentially compressed
}
// TODO: Valhalla removed SharedRuntime::dtrace_object_alloc from here ?

b(done);
}

Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3878,14 +3878,6 @@ void TemplateTable::_new() {
__ clinit_barrier(r4, rscratch1, nullptr /*L_fast_path*/, &slow_case);

__ allocate_instance(r4, r0, r3, r1, true, slow_case);
if (DTraceAllocProbes) {
// Trigger dtrace event for fastpath
__ push(atos); // save the return value
__ call_VM_leaf(
CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), r0);
__ pop(atos); // restore the return value

}
__ b(done);

// slow case
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/interp_masm_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ void InterpreterMacroAssembler::allocate_instance(Register klass, Register new_o
Register t1, Register t2,
bool clear_fields, Label& alloc_failed) {
MacroAssembler::allocate_instance(klass, new_obj, t1, t2, clear_fields, alloc_failed);
if (DTraceMethodProbes) {
if (DTraceAllocProbes) {
// Trigger dtrace event for fastpath
push(atos);
call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), new_obj);
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/cpu/x86/templateTable_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3826,13 +3826,6 @@ void TemplateTable::_new() {
__ clinit_barrier(rcx, nullptr /*L_fast_path*/, &slow_case);

__ allocate_instance(rcx, rax, rdx, rbx, true, slow_case);
if (DTraceAllocProbes) {
// Trigger dtrace event for fastpath
__ push(atos);
__ call_VM_leaf(
CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), rax);
__ pop(atos);
}
__ jmp(done);

// slow case
Expand Down