blob: 4d0473ff7859117117040de05c4bc1a68788d64b [file] [log] [blame]
Keith Davis33ed2212020-03-30 10:43:41 +01001//
Jim Flynnbbfe6032020-07-20 16:57:44 +01002// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
Keith Davis33ed2212020-03-30 10:43:41 +01003// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Keith Davis33ed2212020-03-30 10:43:41 +01008#include "ProfilingStateMachine.hpp"
9#include "INotifyBackends.hpp"
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000010#include "ProfilingStateMachine.hpp"
Keith Davis33ed2212020-03-30 10:43:41 +010011
Jim Flynnbbfe6032020-07-20 16:57:44 +010012#include <common/include/CommandHandlerFunctor.hpp>
13#include <common/include/Packet.hpp>
14
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000015namespace arm
Keith Davis33ed2212020-03-30 10:43:41 +010016{
17
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000018namespace pipe
Keith Davis33ed2212020-03-30 10:43:41 +010019{
20
Jim Flynnbbfe6032020-07-20 16:57:44 +010021class DeactivateTimelineReportingCommandHandler : public arm::pipe::CommandHandlerFunctor
Keith Davis33ed2212020-03-30 10:43:41 +010022{
23
24public:
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 Flynnbbfe6032020-07-20 16:57:44 +010037 void operator()(const arm::pipe::Packet& packet) override;
Keith Davis33ed2212020-03-30 10:43:41 +010038
39private:
40 std::atomic<bool>& m_TimelineReporting;
41 ProfilingStateMachine& m_StateMachine;
42 INotifyBackends& m_BackendNotifier;
43};
44
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000045} // namespace pipe
Keith Davis33ed2212020-03-30 10:43:41 +010046
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000047} // namespace arm