Lines Matching refs:log
52 int FfrtConverter::ExtractProcessId(const std::string& log) in ExtractProcessId() argument
56 if (std::regex_search(log, match, pidPattern)) { in ExtractProcessId()
70 std::string FfrtConverter::ExtractTimeStr(const std::string& log) in ExtractTimeStr() argument
74 if (std::regex_search(log, match, timePattern)) { in ExtractTimeStr()
81 std::string FfrtConverter::ExtractCpuId(const std::string& log) in ExtractCpuId() argument
85 if (std::regex_search(log, match, cpuIdPattern)) { in ExtractCpuId()
241 int FfrtConverter::FindTid(std::string& log) in FindTid() argument
244 auto beginPos = log.find(index); in FindTid()
245 auto endPos = log.find_first_of(" ", beginPos); in FindTid()
247 auto tid = stoi(log.substr(beginPos, endPos - beginPos)); in FindTid()
251 void FfrtConverter::ClassifySchedSwitchLogs(std::string& log, in ClassifySchedSwitchLogs() argument
256 …if (log.find("prev_comm=ffrt") != std::string::npos || log.find("prev_comm=OS_FFRT") != std::strin… in ClassifySchedSwitchLogs()
257 auto pid = ExtractProcessId(log); in ClassifySchedSwitchLogs()
263 auto beginPos = log.find(begin) + begin.length(); in ClassifySchedSwitchLogs()
264 auto endPos = log.find(end); in ClassifySchedSwitchLogs()
265 auto tid = FindTid(log); in ClassifySchedSwitchLogs()
267 ffrtPidsMap[pid][tid].name = log.substr(beginPos, endPos - beginPos); in ClassifySchedSwitchLogs()
270 auto prevTid = FindTid(log); in ClassifySchedSwitchLogs()
276 auto beginPos = log.find(begin) + begin.length(); in ClassifySchedSwitchLogs()
278 auto endPos = log.find(end); in ClassifySchedSwitchLogs()
279 auto nextTid = stoi(log.substr(beginPos, endPos - beginPos)); in ClassifySchedSwitchLogs()
286 void FfrtConverter::FindFfrtProcessAndClassifyLogs(std::string& log, in FindFfrtProcessAndClassifyLogs() argument
291 if (log.find("sched_switch") != std::string::npos) { in FindFfrtProcessAndClassifyLogs()
292 ClassifySchedSwitchLogs(log, line, traceMap, ffrtPidsMap); in FindFfrtProcessAndClassifyLogs()
295 …if (log.find(": sched_wak") != std::string::npos || (log.find("sched_blocked_reason:") != std::str… in FindFfrtProcessAndClassifyLogs()
297 auto beginPos = log.find(begin); in FindFfrtProcessAndClassifyLogs()
298 auto endPos = log.find_first_of(" ", beginPos); in FindFfrtProcessAndClassifyLogs()
300 auto tid = stoi(log.substr(beginPos, endPos - beginPos)); in FindFfrtProcessAndClassifyLogs()
308 if (std::regex_search(log, match, matchPattern_)) { in FindFfrtProcessAndClassifyLogs()
309 auto endPos = log.find(match.str()); in FindFfrtProcessAndClassifyLogs()
310 std::string res = log.substr(0, endPos); in FindFfrtProcessAndClassifyLogs()
314 auto tid = stoi(log.substr(beginPos, endPos - beginPos)); in FindFfrtProcessAndClassifyLogs()
437 std::string& log, in DeleteRedundance() argument
450 log.clear(); in DeleteRedundance()
460 log.clear(); in DeleteRedundance()
464 log.clear(); in DeleteRedundance()
470 log = MakeEndFakeLog(mark, pid, label, gid, tid, threadName, prio); in DeleteRedundance()
476 log = fakeLog; in DeleteRedundance()