mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-26 16:41:00 +00:00
添加restrictValue范围判断
Signed-off-by: ganchuantao <ganchuantao1@huawei.com>
This commit is contained in:
parent
023dc9ec26
commit
2ba848cfcc
@ -120,6 +120,11 @@ std::string FtraceFsOps::GetKernelSymbols() const
|
||||
CHECK_TRUE(restrictValue.size() > 0, "", "read kptr_restrict failed!");
|
||||
|
||||
bool valueChanged = false;
|
||||
if (restrictValue.find("0") == string::npos && restrictValue.find("1") == string::npos
|
||||
&& restrictValue.find("2") == string::npos) {
|
||||
PROFILER_LOG_ERROR(LOG_CORE, "not value string");
|
||||
return ""
|
||||
}
|
||||
if (std::stoi(restrictValue) == 0) {
|
||||
SetKptrRestrict("1");
|
||||
valueChanged = true;
|
||||
|
Loading…
Reference in New Issue
Block a user