From c116ef04cbb17d536e7248e87559256556aa476f Mon Sep 17 00:00:00 2001 From: dengliang <15934868816@139.com> Date: Mon, 8 Sep 2025 20:21:46 +0800 Subject: [PATCH 1/2] fix ClientReceieve trace Signed-off-by: dengliang <15934868816@139.com> --- .../src/core/invoker/source/hitrace_invoker.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ipc/native/src/core/invoker/source/hitrace_invoker.cpp b/ipc/native/src/core/invoker/source/hitrace_invoker.cpp index c39c19b6..44f18c4d 100644 --- a/ipc/native/src/core/invoker/source/hitrace_invoker.cpp +++ b/ipc/native/src/core/invoker/source/hitrace_invoker.cpp @@ -92,12 +92,11 @@ void HitraceInvoker::TraceClientReceieve(int32_t handle, uint32_t code, uint32_t } bool isClientTraced = IsClientTraced(handle, flags, traceId); if (isClientTraced) { - if (!(flags & TF_ONE_WAY)) { - // restore thread trace id - HiTraceChain::SetId(traceId); - // tracepoint: CR(Client Receive) - HiTraceChain::Tracepoint(HITRACE_TP_CR, childId, "SYNC handle=%d,code=%u", handle, code); - } + // restore thread trace id + HiTraceChain::SetId(traceId); + // tracepoint: CR(Client Receive) + HiTraceChain::Tracepoint(HITRACE_TP_CR, childId, "%s handle=%d,code=%u", + (flags & TF_ONE_WAY) ? "ASYNC" : "SYNC", handle, code); } } -- Gitee From 66add4dc05ad981017f629c0d6ade49efaf53621 Mon Sep 17 00:00:00 2001 From: dengliang <15934868816@139.com> Date: Tue, 9 Sep 2025 10:37:10 +0800 Subject: [PATCH 2/2] fix ClientReceieve trace Signed-off-by: dengliang <15934868816@139.com> --- ipc/native/src/core/invoker/source/binder_invoker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc/native/src/core/invoker/source/binder_invoker.cpp b/ipc/native/src/core/invoker/source/binder_invoker.cpp index d0fded34..75c4ed8c 100644 --- a/ipc/native/src/core/invoker/source/binder_invoker.cpp +++ b/ipc/native/src/core/invoker/source/binder_invoker.cpp @@ -179,6 +179,7 @@ int BinderInvoker::SendRequest(int handle, uint32_t code, MessageParcel &data, M if (!WriteTransaction(cmd, flags, handle, code, data, nullptr, totalDBinderBufSize)) { ZLOGE(LABEL, "WriteTransaction ERROR"); newData.RewindWrite(oldWritePosition); + HitraceInvoker::TraceClientReceieve(handle, code, flags, traceId, childId); return IPC_INVOKER_WRITE_TRANS_ERR; } -- Gitee