Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "ProfilingStateMachine.hpp" |
| 9 | #include "ProfilingConnectionFactory.hpp" |
FinnWilliamsArm | ce2d9d1 | 2019-09-18 10:28:16 +0100 | [diff] [blame^] | 10 | #include "CounterDirectory.hpp" |
Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | namespace profiling |
| 16 | { |
| 17 | |
| 18 | class ProfilingService |
| 19 | { |
| 20 | public: |
| 21 | ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options); |
| 22 | ~ProfilingService() = default; |
| 23 | |
| 24 | void Run(); |
| 25 | |
FinnWilliamsArm | ce2d9d1 | 2019-09-18 10:28:16 +0100 | [diff] [blame^] | 26 | const ICounterDirectory& GetCounterDirectory() const; |
Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 27 | ProfilingState GetCurrentState() const; |
FinnWilliamsArm | ce2d9d1 | 2019-09-18 10:28:16 +0100 | [diff] [blame^] | 28 | void ResetExternalProfilingOptions(const Runtime::CreationOptions::ExternalProfilingOptions& options); |
Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 29 | |
| 30 | private: |
| 31 | void Initialise(); |
| 32 | |
FinnWilliamsArm | ce2d9d1 | 2019-09-18 10:28:16 +0100 | [diff] [blame^] | 33 | CounterDirectory m_CounterDirectory; |
Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 34 | ProfilingConnectionFactory m_Factory; |
FinnWilliamsArm | ce2d9d1 | 2019-09-18 10:28:16 +0100 | [diff] [blame^] | 35 | Runtime::CreationOptions::ExternalProfilingOptions m_Options; |
| 36 | ProfilingStateMachine m_State; |
Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | } // namespace profiling |
| 40 | |
| 41 | } // namespace armnn |