aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ConnectionAcknowledgedCommandHandler.cpp')
-rw-r--r--src/profiling/ConnectionAcknowledgedCommandHandler.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
index 0071bfc11e..995562fb3f 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
@@ -41,9 +41,21 @@ void ConnectionAcknowledgedCommandHandler::operator()(const Packet& packet)
// Send the counter directory packet.
m_SendCounterPacket.SendCounterDirectoryPacket(m_CounterDirectory);
m_SendTimelinePacket.SendTimelineMessageDirectoryPackage();
-
TimelineUtilityMethods::SendWellKnownLabelsAndEventClasses(m_SendTimelinePacket);
+ if(m_BackendProfilingContext.has_value())
+ {
+ for (auto backendContext : m_BackendProfilingContext.value())
+ {
+ // Enable profiling on the backend and assert that it returns true
+ if(!backendContext.second->EnableProfiling(true))
+ {
+ throw BackendProfilingException(
+ "Unable to enable profiling on Backend Id: " + backendContext.first.Get());
+ }
+ }
+ }
+
break;
case ProfilingState::Active:
return; // NOP