From 42f884148ae83e52eaabcb24ec938078ee4ffec8 Mon Sep 17 00:00:00 2001 From: wenxingqi Date: Thu, 9 Jan 2025 14:48:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9ffrt=5Fconverter.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wenxingqi --- trace_streamer/src/rpc/ffrt_converter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trace_streamer/src/rpc/ffrt_converter.cpp b/trace_streamer/src/rpc/ffrt_converter.cpp index dc353b1fb..55508c17c 100644 --- a/trace_streamer/src/rpc/ffrt_converter.cpp +++ b/trace_streamer/src/rpc/ffrt_converter.cpp @@ -615,7 +615,6 @@ void FfrtConverter::FindFfrtProcClassifyLogs(LogInfo logInfo, WakeLogs &traceMap traceMap[tid] = {}; } traceMap[tid].emplace_back(logInfo.lineno); - return; } ParseOtherTraceLogs(LogInfo{logInfo.log, logInfo.lineno, static_cast(pid), tid}, traceMap, ffrtWakeLogs); } @@ -778,6 +777,13 @@ static std::string ConvertWorkerLogToTask(ConStr &mark, int pid, int tid, int gi if (mark.find("sched_blocked_reason: ") != std::string::npos) { return ReplaceSchedBlockLog(fakeLog, pid, gid); } + if (mark.find("sched_blocked_reason: ") != std::string::npos) { + if (mark.find("pid=" + std::to_string(tid)) != std::string::npos) { + return ReplaceSchedBlockLog(fakeLog, pid, gid); + } else { + return ReplaceTracingMarkLog(fakeLog, label, pid, gid); + } + } return ReplaceTracingMarkLog(fakeLog, label, pid, gid); } -- Gitee From e6357df88afb8e262ca50b57c2fe7aed2ac1b1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E6=B4=81?= Date: Thu, 9 Jan 2025 07:18:37 +0000 Subject: [PATCH 2/2] update trace_streamer/src/rpc/ffrt_converter.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董洁 --- trace_streamer/src/rpc/ffrt_converter.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/trace_streamer/src/rpc/ffrt_converter.cpp b/trace_streamer/src/rpc/ffrt_converter.cpp index 55508c17c..d467a2aec 100644 --- a/trace_streamer/src/rpc/ffrt_converter.cpp +++ b/trace_streamer/src/rpc/ffrt_converter.cpp @@ -774,9 +774,6 @@ static std::string ConvertWorkerLogToTask(ConStr &mark, int pid, int tid, int gi return ReplaceTracingMarkLog(fakeLog, label, pid, gid); } } - if (mark.find("sched_blocked_reason: ") != std::string::npos) { - return ReplaceSchedBlockLog(fakeLog, pid, gid); - } if (mark.find("sched_blocked_reason: ") != std::string::npos) { if (mark.find("pid=" + std::to_string(tid)) != std::string::npos) { return ReplaceSchedBlockLog(fakeLog, pid, gid); -- Gitee