IVGCVSW-4666 Call EnableProfiling when state switches to active

 * Move the call to EnableProfiling() into ConnectionAcknowledgedHandler
 * Fix an issue with MockGatord forcing some command handlers to be quiet
 * Add some small unrelated improvements and typo fixes to the
   periodic counter command handlers

Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I9e6066b78d1f782cfaf27c11571c0ec5cb5d126f
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 32c7c39..483eea7 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -178,9 +178,6 @@
         throw RuntimeException("It is not possible to enable timeline reporting without profiling being enabled");
     }
 
-    // pass configuration info to the profiling service
-    m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions);
-
     // Load any available/compatible dynamic backend before the runtime
     // goes through the backend registry
     LoadDynamicBackends(options.m_DynamicBackendsPath);
@@ -213,24 +210,19 @@
             // Backends that don't support profiling will return a null profiling context.
             if (profilingContext)
             {
-                // Enable profiling on the backend and assert that it returns true
-                if(profilingContext->EnableProfiling(true))
-                {
-                    // Pass the context onto the profiling service.
-                    m_ProfilingService.AddBackendProfilingContext(id, profilingContext);
-                }
-                else
-                {
-                    throw BackendProfilingException("Unable to enable profiling on Backend Id: " + id.Get());
-                }
+                // Pass the context onto the profiling service.
+                m_ProfilingService.AddBackendProfilingContext(id, profilingContext);
             }
         }
         catch (const BackendUnavailableException&)
         {
             // Ignore backends which are unavailable
         }
-
     }
+
+    // pass configuration info to the profiling service
+    m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions);
+
     m_DeviceSpec.AddSupportedBackends(supportedBackends);
 }
 
@@ -273,7 +265,6 @@
         }
     }
 
-
     // Clear all dynamic backends.
     DynamicBackendUtils::DeregisterDynamicBackends(m_DeviceSpec.GetDynamicBackends());
     m_DeviceSpec.ClearDynamicBackends();