From df57b913306537b47de3452fdf862525c9f56a0c Mon Sep 17 00:00:00 2001 From: predutta Date: Mon, 20 Jul 2026 10:24:24 -0700 Subject: [PATCH] Log nBytes of trace only for plio Signed-off-by: predutta --- profile/device/aie_trace/aie_trace_offload.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profile/device/aie_trace/aie_trace_offload.cpp b/profile/device/aie_trace/aie_trace_offload.cpp index 789e5a71..d60497e1 100644 --- a/profile/device/aie_trace/aie_trace_offload.cpp +++ b/profile/device/aie_trace/aie_trace_offload.cpp @@ -415,8 +415,9 @@ uint64_t AIETraceOffload::syncAndLog(uint64_t index) bd.offloadDone = true; } - // Log nBytes of trace - traceLogger->addAIETraceData(index, hostBuf, nBytes, mEnCircularBuf); + // Log nBytes of trace. Always copy: syncTraceBuf() unmaps the BO before returning. + traceLogger->addAIETraceData(index, hostBuf, nBytes, mEnCircularBuf || isPLIO); + return nBytes; }