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_;