mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-02-25 20:59:37 +00:00
提供属性设置oom水线
issues:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9CHSB Signed-off-by: rentangyu <rentangyu@huawei.com>
This commit is contained in:
parent
ba997e9e94
commit
172a176865
@ -357,6 +357,11 @@ int SystemProperties::GetArkProperties()
|
||||
return system::GetIntParameter<int>("persist.ark.properties", -1);
|
||||
}
|
||||
|
||||
std::string SystemProperties::GetMemConfigProperty()
|
||||
{
|
||||
return system::GetParameter("persist.ark.mem_config_property", "");
|
||||
}
|
||||
|
||||
std::string SystemProperties::GetArkBundleName()
|
||||
{
|
||||
return system::GetParameter("persist.ark.arkbundlename", "");
|
||||
|
@ -352,6 +352,8 @@ public:
|
||||
|
||||
static int GetArkProperties();
|
||||
|
||||
static std::string GetMemConfigProperty();
|
||||
|
||||
static std::string GetArkBundleName();
|
||||
|
||||
static size_t GetGcThreadNum();
|
||||
|
@ -62,6 +62,7 @@ bool ArkJSRuntime::Initialize(const std::string& libraryPath, bool isDebugMode,
|
||||
#ifdef OHOS_PLATFORM
|
||||
option.SetArkProperties(SystemProperties::GetArkProperties());
|
||||
option.SetArkBundleName(SystemProperties::GetArkBundleName());
|
||||
option.SetMemConfigProperty(SystemProperties::GetMemConfigProperty());
|
||||
option.SetGcThreadNum(SystemProperties::GetGcThreadNum());
|
||||
option.SetLongPauseTime(SystemProperties::GetLongPauseTime());
|
||||
option.SetEnableAsmInterpreter(SystemProperties::GetAsmInterpreterEnabled());
|
||||
|
@ -147,4 +147,11 @@ HWTEST_F(PluginAdapterTest, GetDevInfoTest003, TestSize.Level1)
|
||||
EXPECT_EQ(infoPair.first, INFO_STR_TWO);
|
||||
EXPECT_EQ(infoPair.second, true);
|
||||
}
|
||||
|
||||
HWTEST_F(PluginAdapterTest, GetMemConfigProperty001, TestSize.Level1)
|
||||
{
|
||||
OHOS::system::SetParameter("persist.ark.mem_config_property", "jsHeap500");
|
||||
std::string ret = SystemProperties::GetMemConfigProperty("persist.ark.mem_config_property", "");
|
||||
EXPECT_EQ(ret, "jsHeap500");
|
||||
}
|
||||
} // namespace OHOS::Ace::Framework
|
||||
|
Loading…
x
Reference in New Issue
Block a user