From 2eb75e84cd588c798b60b8ea6947ac821baab4eb Mon Sep 17 00:00:00 2001 From: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com> Date: Fri, 28 Aug 2026 23:57:23 +0500 Subject: [PATCH] Move leftover copies in SYCL profiling tools --- sycl/tools/sycl-prof/main.cpp | 3 ++- sycl/tools/xpti_helpers/usm_analyzer.hpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sycl/tools/sycl-prof/main.cpp b/sycl/tools/sycl-prof/main.cpp index ac511676332f6..86b1d495ba1f4 100644 --- a/sycl/tools/sycl-prof/main.cpp +++ b/sycl/tools/sycl-prof/main.cpp @@ -11,6 +11,7 @@ #include #include +#include using namespace llvm; @@ -41,7 +42,7 @@ int main(int argc, char **argv, char *env[]) { } std::string ProfOutFile = "SYCL_PROF_OUT_FILE=" + OutputFilename; - NewEnv.push_back(ProfOutFile); + NewEnv.push_back(std::move(ProfOutFile)); NewEnv.push_back("XPTI_FRAMEWORK_DISPATCHER=libxptifw.so"); NewEnv.push_back("XPTI_SUBSCRIBERS=libsycl_profiler_collector.so"); NewEnv.push_back("XPTI_TRACE_ENABLE=1"); diff --git a/sycl/tools/xpti_helpers/usm_analyzer.hpp b/sycl/tools/xpti_helpers/usm_analyzer.hpp index 511110be3640c..d30e043d8805b 100644 --- a/sycl/tools/xpti_helpers/usm_analyzer.hpp +++ b/sycl/tools/xpti_helpers/usm_analyzer.hpp @@ -16,6 +16,7 @@ #include #include #include +#include struct TracepointInfo { std::string Source; @@ -286,7 +287,7 @@ class USMAnalyzer { Info.Location = GS.LastTracepoint; Info.Length = *Params->psize; Info.Kind = AllocKind::host; - GS.ActivePointers[**Params->pppMem] = Info; + GS.ActivePointers[**Params->pppMem] = std::move(Info); } static void handleUSMDeviceAlloc(const ur_usm_device_alloc_params_t *Params) { @@ -296,7 +297,7 @@ class USMAnalyzer { Info.Location = GS.LastTracepoint; Info.Length = *Params->psize; Info.Kind = AllocKind::device; - GS.ActivePointers[**Params->pppMem] = Info; + GS.ActivePointers[**Params->pppMem] = std::move(Info); } static void handleUSMSharedAlloc(const ur_usm_shared_alloc_params_t *Params) { @@ -305,7 +306,7 @@ class USMAnalyzer { Info.Location = GS.LastTracepoint; Info.Length = *Params->psize; Info.Kind = AllocKind::shared; - GS.ActivePointers[**Params->pppMem] = Info; + GS.ActivePointers[**Params->pppMem] = std::move(Info); } static void handleUSMFree(const ur_usm_free_params_t *Params) {