Skip to content

Commit 8942fb4

Browse files
committed
Add debug code before emit_trampoline_stub is called
1 parent a63dac5 commit 8942fb4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,22 @@ address MacroAssembler::trampoline_call(Address entry) {
862862

863863
address target = entry.target();
864864

865+
bool is_test_trampoline = false;
866+
if (Thread::current()->is_Compiler_thread()) {
867+
ciEnv* env = ciEnv::current();
868+
if (env != nullptr) {
869+
CompileTask* task = env->task();
870+
if (task != nullptr && task->method() != nullptr) {
871+
const char* external_name = task->method()->external_name();
872+
const char* method_name = task->method()->name()->as_utf8();
873+
if (strcmp(method_name, "test") == 0) {
874+
is_test_trampoline = true;
875+
dmb(Assembler::OSH);
876+
}
877+
}
878+
}
879+
}
880+
865881
if (!is_always_within_branch_range(entry)) {
866882
if (!in_scratch_emit_size()) {
867883
// We don't want to emit a trampoline if C2 is generating dummy

0 commit comments

Comments
 (0)