clean code

Signed-off-by: zyxzyx <zhangyixin19@huawei.com>
This commit is contained in:
zyxzyx 2024-11-15 12:38:49 +08:00
parent 00ed1e647b
commit e1f11bfc73
2 changed files with 3 additions and 3 deletions

View File

@ -136,7 +136,7 @@ int32_t NativeMemoryProfilerSaClientManager::GetMallocStats(int fd, int pid, int
config->pid_ = static_cast<int32_t>(pid);
config->duration_ = NMD_DURATION;
config->mallocDisable_ = true;
config->mmapDisable = true;
config->mmapDisable_ = true;
}
config->nmdPid_ = static_cast<uint32_t>(pid);
config->nmdType_ = static_cast<uint32_t>(type);

View File

@ -231,8 +231,8 @@ int32_t NativeMemoryProfilerSaService::StartHook(std::shared_ptr<NativeMemoryPro
auto retFile = COMMON::CheckNotExistsFilePath(config->filePath_);
if (!retFile.first) {
PROFILER_LOG_INFO(LOG_CORE, "%s:check file path %s fail", __func__, config->filePath_.c_str());
COMMON::PluginWriteToHisysevent("native_hook_plugin", "hiview", args, COMMON::ErrorType::RET_IVALID_PATH,
"check file path failed");
COMMON::PluginWriteToHisysevent("native_hook_plugin", "hiview", args,
COMMON::ErrorType::RET_IVALID_PATH, "check file path failed");
return RET_ERR;
}
int fdTemp = open(retFile.second.c_str(), O_RDWR | O_CREAT, FILE_MODE);