From ddb7bff8016e30bd83edd817aa4d9793c0f4b624 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 18 Mar 2025 09:14:50 -0400 Subject: [PATCH] Downport of f0ceda6: Unwind String.indexOf intrinsic on AArch64. Fix TTSP test. --- ddprof-lib/src/main/cpp/stackFrame_aarch64.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ddprof-lib/src/main/cpp/stackFrame_aarch64.cpp b/ddprof-lib/src/main/cpp/stackFrame_aarch64.cpp index d9af9a6b..e169123e 100644 --- a/ddprof-lib/src/main/cpp/stackFrame_aarch64.cpp +++ b/ddprof-lib/src/main/cpp/stackFrame_aarch64.cpp @@ -98,7 +98,14 @@ bool StackFrame::unwindStub(instruction_t *entry, const char *name, pc = ((uintptr_t *)sp)[-1]; return true; } - } + } else if (strncmp(name, "indexof_linear_", 15) == 0 && + entry != NULL && entry[0] == 0xa9be57f4 && entry[1] == 0xa9015ff6) { + // JDK-8189103: String.indexOf intrinsic. + // Entry and exit are covered by the very first 'if', in all other cases SP is 4 words off. + sp += 32; + pc = link(); + return true; + } return false; }