Store a profiling context returned from a backend that support profiling, and register its counters
| 216 | |
| 217 | // Store a profiling context returned from a backend that support profiling, and register its counters |
| 218 | void ProfilingService::AddBackendProfilingContext( |
| 219 | const std::string& backendId, |
| 220 | std::shared_ptr<IBackendProfilingContext> profilingContext) |
| 221 | { |
| 222 | #if !defined(ARMNN_STUB_PROFILING) |
| 223 | ARM_PIPE_ASSERT(profilingContext != nullptr); |
| 224 | // Register the backend counters |
| 225 | m_MaxGlobalCounterId = profilingContext->RegisterCounters(m_MaxGlobalCounterId); |
| 226 | m_BackendProfilingContexts.emplace(backendId, std::move(profilingContext)); |
| 227 | #else |
| 228 | IgnoreUnused(backendId); |
| 229 | IgnoreUnused(profilingContext); |
| 230 | #endif // ARMNN_STUB_PROFILING |
| 231 | } |
| 232 | const ICounterDirectory& ProfilingService::GetCounterDirectory() const |
| 233 | { |
| 234 | return m_CounterDirectory; |
no test coverage detected