From 5e1c2a54b84a2a0c455e94a686b13f47845a0b8a Mon Sep 17 00:00:00 2001 From: Ch Vamshi Krishna <40261882+chvamshi-xilinx@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:58:53 +0530 Subject: [PATCH] fixing issue in adf::event crash (#8119) (#8120) Co-authored-by: ch vamshi krishna (cherry picked from commit 17e413bb7e204e5298fd4975a68febe06cde42dc) --- src/runtime_src/core/common/api/aie/xrt_graph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime_src/core/common/api/aie/xrt_graph.cpp b/src/runtime_src/core/common/api/aie/xrt_graph.cpp index 8ddca474b61..60d9f9cc78f 100644 --- a/src/runtime_src/core/common/api/aie/xrt_graph.cpp +++ b/src/runtime_src/core/common/api/aie/xrt_graph.cpp @@ -868,7 +868,9 @@ xrtAIEStartProfiling(xrtDeviceHandle handle, int option, const char *port1Name, auto event = create_profiling_event(handle); if (option < 0 || option > 3) throw xrt_core::error(-EINVAL, "Not a valid profiling option"); - auto hdl = event->start_profiling(option, port1Name, port2Name, value); + const std::string port1 = port1Name ? port1Name : ""; + const std::string port2 = port2Name ? port2Name : ""; + auto hdl = event->start_profiling(option, port1, port2, value); if (hdl != xrt::aie::profiling_impl::invalid_handle) { profiling_cache[hdl] = event; return hdl;