From fa89ee5ee0ded2ac4bc8aa5e74906c799d275594 Mon Sep 17 00:00:00 2001 From: Sarbojit Sarkar Date: Wed, 3 Mar 2021 11:44:03 -0500 Subject: [PATCH] SWDEV-254329 - Init Profiling when ON Change-Id: I72f9da94f8fbb95e66cf145831b252af05a19dc4 --- rocclr/platform/command.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rocclr/platform/command.hpp b/rocclr/platform/command.hpp index e2f97553ae..4ae045c724 100644 --- a/rocclr/platform/command.hpp +++ b/rocclr/platform/command.hpp @@ -99,8 +99,10 @@ class Event : public RuntimeObject { struct ProfilingInfo { ProfilingInfo(bool enabled = false) : enabled_(enabled), waves_(0), marker_ts_(false) { - clear(); - callback_ = nullptr; + if (enabled) { + clear(); + callback_ = nullptr; + } } uint64_t queued_;