blob: eb29c33fba16614accd7e69774b90c888978a44d [file] [log] [blame]
Keith Davis02356de2019-08-26 18:28:17 +01001//
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"
FinnWilliamsArmce2d9d12019-09-18 10:28:16 +010010#include "CounterDirectory.hpp"
Keith Davis02356de2019-08-26 18:28:17 +010011
12namespace armnn
13{
14
15namespace profiling
16{
17
18class ProfilingService
19{
20public:
21 ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options);
22 ~ProfilingService() = default;
23
24 void Run();
25
FinnWilliamsArmce2d9d12019-09-18 10:28:16 +010026 const ICounterDirectory& GetCounterDirectory() const;
Keith Davis02356de2019-08-26 18:28:17 +010027 ProfilingState GetCurrentState() const;
FinnWilliamsArmce2d9d12019-09-18 10:28:16 +010028 void ResetExternalProfilingOptions(const Runtime::CreationOptions::ExternalProfilingOptions& options);
Keith Davis02356de2019-08-26 18:28:17 +010029
30private:
31 void Initialise();
32
FinnWilliamsArmce2d9d12019-09-18 10:28:16 +010033 CounterDirectory m_CounterDirectory;
Keith Davis02356de2019-08-26 18:28:17 +010034 ProfilingConnectionFactory m_Factory;
FinnWilliamsArmce2d9d12019-09-18 10:28:16 +010035 Runtime::CreationOptions::ExternalProfilingOptions m_Options;
36 ProfilingStateMachine m_State;
Keith Davis02356de2019-08-26 18:28:17 +010037};
38
39} // namespace profiling
40
41} // namespace armnn