update ecmascript/dfx/cpu_profiler/cpu_profiler.cpp.

Signed-off-by: 邵益江 <shaoyijiang@huawei.com>
This commit is contained in:
邵益江 2024-06-14 04:03:44 +00:00 committed by Gitee
parent 84b41b4c98
commit 1e0568451b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -55,7 +55,7 @@ bool CpuProfiler::RegisterGetStackSignal()
LOG_ECMA(ERROR) << "CpuProfiler::RegisterGetStackSignal, sigemptyset failed, errno = " << errno;
return false;
}
#if defined(PANDA_TARGET_ARM64) && !defined(ARK_NOT_SUPPORT_INTL_GLOBAL)
#if defined(PANDA_TARGET_ARM64) && !defined(ANDROID_PLATFORM)
sa.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK;
#else
sa.sa_flags = SA_RESTART | SA_SIGINFO;
@ -64,7 +64,7 @@ bool CpuProfiler::RegisterGetStackSignal()
LOG_ECMA(ERROR) << "CpuProfiler::RegisterGetStackSignal, sigaction failed, errno = " << errno;
return false;
}
#if defined(PANDA_TARGET_ARM64) && !defined(ARK_NOT_SUPPORT_INTL_GLOBAL)
#if defined(PANDA_TARGET_ARM64) && !defined(ANDROID_PLATFORM)
constexpr const size_t stackSize = 128_KB;
segvStack_.ss_sp = valloc(stackSize);
if (segvStack_.ss_sp == nullptr) {