mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-23 06:50:12 +00:00
修改editor采集过程中打开device帧率异常问题
Signed-off-by: frank-huangran <frank.huangran@huawei.com>
This commit is contained in:
parent
116dc9a58e
commit
06c2ffaa86
@ -29,6 +29,7 @@ public:
|
||||
static void SetByTrace(std::string message);
|
||||
static SpProfiler *GetCmdProfilerItem(CommandType commandType, bool cmdFlag);
|
||||
static SpProfiler *GetCmdProfilerItemContinue(CommandType commandType, bool cmdFlag);
|
||||
static inline bool editorFlag = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -395,11 +395,13 @@ public:
|
||||
if (retCode.find("smartperf") != std::string::npos) {
|
||||
OHOS::SmartPerf::Dubai::dubaiPkgName = retCode;
|
||||
}
|
||||
std::string processId = "";
|
||||
OHOS::SmartPerf::StartUpDelay sp;
|
||||
processId = sp.GetPidByPkg(retCode);
|
||||
SpProfilerFactory::SetProfilerPidByPkg(processId);
|
||||
SpProfilerFactory::SetProfilerPkg(retCode);
|
||||
if (!SpProfilerFactory::editorFlag) {
|
||||
std::string processId = "";
|
||||
OHOS::SmartPerf::StartUpDelay sp;
|
||||
processId = sp.GetPidByPkg(retCode);
|
||||
SpProfilerFactory::SetProfilerPidByPkg(processId);
|
||||
SpProfilerFactory::SetProfilerPkg(retCode);
|
||||
}
|
||||
spSocket.Sendto(retCode);
|
||||
} else if (iterator->first == MessageType::FPS_STOP) {
|
||||
spSocket.Sendto(resultFPS);
|
||||
|
@ -335,6 +335,7 @@ void SPTask::AsyncGetDataMap(std::function<void(std::string data)> msgTask)
|
||||
asyncDataMtx.lock();
|
||||
std::map<std::string, std::string> dataMap;
|
||||
if (!curTaskInfo.packageName.empty()) {
|
||||
SpProfilerFactory::editorFlag = true;
|
||||
std::string processId = "";
|
||||
OHOS::SmartPerf::StartUpDelay sp;
|
||||
processId = sp.GetPidByPkg(curTaskInfo.packageName);
|
||||
@ -480,6 +481,7 @@ ErrCode SPTask::StopTask()
|
||||
thread.join();
|
||||
}
|
||||
KillHiperfCmd();
|
||||
SpProfilerFactory::editorFlag = false;
|
||||
return ErrCode::OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user