blob: 4dec67d335020946c085da50414280bf17e9ba0d [file] [log] [blame]
Ferran Balaguer1b941722019-08-28 16:57:18 +01001//
Jim Flynn83d08a92020-07-09 13:48:16 +01002// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
Ferran Balaguer1b941722019-08-28 16:57:18 +01003// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Matteo Martincigh24e8f922019-09-19 11:57:46 +01008#include <SendCounterPacket.hpp>
Sadik Armagan3896b472020-02-10 12:24:15 +00009#include <SendThread.hpp>
Matteo Martincigh24e8f922019-09-19 11:57:46 +010010#include <ProfilingUtils.hpp>
Matteo Martincighe8485382019-10-10 14:08:21 +010011#include <IProfilingConnectionFactory.hpp>
Ferran Balaguer1b941722019-08-28 16:57:18 +010012
13#include <armnn/Exceptions.hpp>
Matteo Martincigh24e8f922019-09-19 11:57:46 +010014#include <armnn/Optional.hpp>
15#include <armnn/Conversion.hpp>
Narumol Prangnawaratac2770a2020-04-01 16:51:23 +010016#include <armnn/utility/Assert.hpp>
Jan Eilers8eb25602020-03-09 12:13:48 +000017#include <armnn/utility/IgnoreUnused.hpp>
Matthew Sloyan371b70e2020-09-11 10:14:57 +010018#include <armnn/utility/NumericCast.hpp>
Ferran Balaguer1b941722019-08-28 16:57:18 +010019
Sadik Armagan3896b472020-02-10 12:24:15 +000020#include <atomic>
21#include <condition_variable>
22#include <mutex>
23#include <thread>
24
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000025namespace arm
Matteo Martincigh24e8f922019-09-19 11:57:46 +010026{
Ferran Balaguer1b941722019-08-28 16:57:18 +010027
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000028namespace pipe
Matteo Martincigh24e8f922019-09-19 11:57:46 +010029{
Matteo Martincighd0613b52019-10-09 16:47:04 +010030
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010031class SendCounterPacketTest : public SendCounterPacket
32{
33public:
Sadik Armagan3896b472020-02-10 12:24:15 +000034 SendCounterPacketTest(IBufferManager& buffer)
35 : SendCounterPacket(buffer)
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010036 {}
37
38 bool CreateDeviceRecordTest(const DevicePtr& device,
39 DeviceRecord& deviceRecord,
40 std::string& errorMessage)
41 {
42 return CreateDeviceRecord(device, deviceRecord, errorMessage);
43 }
44
45 bool CreateCounterSetRecordTest(const CounterSetPtr& counterSet,
46 CounterSetRecord& counterSetRecord,
47 std::string& errorMessage)
48 {
49 return CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage);
50 }
51
52 bool CreateEventRecordTest(const CounterPtr& counter,
53 EventRecord& eventRecord,
54 std::string& errorMessage)
55 {
56 return CreateEventRecord(counter, eventRecord, errorMessage);
57 }
58
59 bool CreateCategoryRecordTest(const CategoryPtr& category,
60 const Counters& counters,
61 CategoryRecord& categoryRecord,
62 std::string& errorMessage)
63 {
64 return CreateCategoryRecord(category, counters, categoryRecord, errorMessage);
65 }
66};
Matteo Martincigh24e8f922019-09-19 11:57:46 +010067
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000068} // namespace pipe
Matteo Martincigh24e8f922019-09-19 11:57:46 +010069
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000070} // namespace arm