mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
Fix cpuprofiler Sampling error
Issue:#I9IRLD Signed-off-by: yang-19970325 <yangyang585@huawei.com> Change-Id: I34602b62fe91fe1bd73977a967b23cfcced744d2
This commit is contained in:
parent
4ee8e5f33e
commit
b417c1b87e
@ -217,6 +217,11 @@ public:
|
||||
return DEFAULT_RESERVED_STACK_SIZE;
|
||||
}
|
||||
|
||||
static size_t GetAllowedUpperStackDiff()
|
||||
{
|
||||
return ALLOWED_UPPER_STACK_DIFF;
|
||||
}
|
||||
|
||||
size_t GetMaxJSSerializerSize() const
|
||||
{
|
||||
return maxJSSerializerSize_;
|
||||
@ -227,6 +232,7 @@ private:
|
||||
static constexpr size_t MEDIUM_MEMORY = 128_MB;
|
||||
static constexpr size_t HIGH_MEMORY = 256_MB;
|
||||
static constexpr size_t DEFAULT_STACK_SIZE = 992_KB;
|
||||
static constexpr size_t ALLOWED_UPPER_STACK_DIFF = 4_KB;
|
||||
static constexpr size_t DEFAULT_RESERVED_STACK_SIZE = 16_KB;
|
||||
|
||||
size_t maxHeapSize_ {0};
|
||||
|
@ -820,7 +820,7 @@ size_t JSThread::GetAsmStackLimit()
|
||||
bool JSThread::IsLegalAsmSp(uintptr_t sp) const
|
||||
{
|
||||
uint64_t bottom = GetStackLimit() - EcmaParamConfiguration::GetDefaultReservedStackSize();
|
||||
uint64_t top = GetStackStart();
|
||||
uint64_t top = GetStackStart() + EcmaParamConfiguration::GetAllowedUpperStackDiff();
|
||||
return (bottom <= sp && sp <= top);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user