Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 1 | // |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 8 | #include "ProfilingStateMachine.hpp" |
| 9 | #include "INotifyBackends.hpp" |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 10 | #include "ProfilingStateMachine.hpp" |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 11 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 12 | #include <common/include/CommandHandlerFunctor.hpp> |
| 13 | #include <common/include/Packet.hpp> |
| 14 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 15 | namespace arm |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 16 | { |
| 17 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 18 | namespace pipe |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 19 | { |
| 20 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 21 | class DeactivateTimelineReportingCommandHandler : public arm::pipe::CommandHandlerFunctor |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 22 | { |
| 23 | |
| 24 | public: |
| 25 | DeactivateTimelineReportingCommandHandler(uint32_t familyId, |
| 26 | uint32_t packetId, |
| 27 | uint32_t version, |
| 28 | std::atomic<bool>& timelineReporting, |
| 29 | ProfilingStateMachine& profilingStateMachine, |
| 30 | INotifyBackends& notifyBackends) |
| 31 | : CommandHandlerFunctor(familyId, packetId, version) |
| 32 | , m_TimelineReporting(timelineReporting) |
| 33 | , m_StateMachine(profilingStateMachine) |
| 34 | , m_BackendNotifier(notifyBackends) |
| 35 | {} |
| 36 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 37 | void operator()(const arm::pipe::Packet& packet) override; |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 38 | |
| 39 | private: |
| 40 | std::atomic<bool>& m_TimelineReporting; |
| 41 | ProfilingStateMachine& m_StateMachine; |
| 42 | INotifyBackends& m_BackendNotifier; |
| 43 | }; |
| 44 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 45 | } // namespace pipe |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 46 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 47 | } // namespace arm |