mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 12:10:47 +00:00
Add time-consuming control switches
Add time-consuming control switches Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAKD9Q Signed-off-by: sunpeiyu <sunpeiyu1@huawei.com> Change-Id: I3178eb709be2f289438ea21f360e0f4c235779c3
This commit is contained in:
parent
1e2580b81e
commit
14d46f6096
@ -56,7 +56,8 @@ enum ArkProperties {
|
||||
// Use DISABLE to adapt to the exsiting ArkProperties in testing scripts.
|
||||
DISABLE_SHARED_CONCURRENT_MARK = 1 << 22,
|
||||
ENABLE_ESM_TRACE = 1 << 24,
|
||||
ENABLE_MODULE_LOG = 1 << 25
|
||||
ENABLE_MODULE_LOG = 1 << 25,
|
||||
ENABLE_SERIALIZATION_TIMEOUT_CHECK = 1 << 26
|
||||
};
|
||||
|
||||
// asm interpreter control parsed option
|
||||
@ -622,6 +623,11 @@ public:
|
||||
return (static_cast<uint32_t>(arkProperties_) & ArkProperties::ENABLE_MODULE_LOG) != 0;
|
||||
}
|
||||
|
||||
bool EnableSerializationTimeoutCheck() const
|
||||
{
|
||||
return (static_cast<uint32_t>(arkProperties_) & ArkProperties::ENABLE_SERIALIZATION_TIMEOUT_CHECK) != 0;
|
||||
}
|
||||
|
||||
bool WasSetMaxNonmovableSpaceCapacity() const
|
||||
{
|
||||
return WasOptionSet(OPTION_MAX_UNMOVABLE_SPACE);
|
||||
|
@ -4794,6 +4794,11 @@ bool JSNApi::KeyIsNumber(const char* utf8)
|
||||
bool JSNApi::IsSerializationTimeoutCheckEnabled(const EcmaVM *vm)
|
||||
{
|
||||
CROSS_THREAD_AND_EXCEPTION_CHECK_WITH_RETURN(vm, false);
|
||||
// Open Control Timeout Consumption
|
||||
if (const_cast<EcmaVM *>(vm)->GetJSOptions().EnableSerializationTimeoutCheck()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Currently only log trace on main thread
|
||||
auto jsDebuggerManager = vm->GetJsDebuggerManager();
|
||||
if (jsDebuggerManager != nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user