diff options
author | Cathal Corbett <cathal.corbett@arm.com> | 2022-03-04 10:36:34 +0000 |
---|---|---|
committer | Cathal Corbett <cathal.corbett@arm.com> | 2022-03-07 11:19:08 +0000 |
commit | 19793551a67a5afd4cfb68e5dda7751e3d321a35 (patch) | |
tree | 355707246183ea982d4e6fead5be25f038111624 /src/profiling | |
parent | 344302581b66677a748a456f370752db75adde21 (diff) | |
download | armnn-19793551a67a5afd4cfb68e5dda7751e3d321a35.tar.gz |
IVGCVSW-6817 Add IProfilingService& as an argument to the IReportStructure
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: Ib8e75eea49debe3b1dd8fa72623a55b26cb6ded4
Diffstat (limited to 'src/profiling')
-rw-r--r-- | src/profiling/ActivateTimelineReportingCommandHandler.cpp | 7 | ||||
-rw-r--r-- | src/profiling/IReportStructure.hpp | 4 | ||||
-rw-r--r-- | src/profiling/test/ProfilingTests.cpp | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/profiling/ActivateTimelineReportingCommandHandler.cpp b/src/profiling/ActivateTimelineReportingCommandHandler.cpp index 7f949d361a..940b823978 100644 --- a/src/profiling/ActivateTimelineReportingCommandHandler.cpp +++ b/src/profiling/ActivateTimelineReportingCommandHandler.cpp @@ -5,6 +5,8 @@ #include "ActivateTimelineReportingCommandHandler.hpp" #include "TimelineUtilityMethods.hpp" +#include <ArmNNProfilingServiceInitialiser.hpp> +#include <armnn/profiling/ArmNNProfiling.hpp> #include <armnn/Exceptions.hpp> #include <fmt/format.h> @@ -49,7 +51,10 @@ void ActivateTimelineReportingCommandHandler::operator()(const arm::pipe::Packet m_TimelineReporting = true; - m_ReportStructure.value().ReportStructure(); + armnn::ArmNNProfilingServiceInitialiser initialiser; + std::unique_ptr<IProfilingService> profilingService = IProfilingService::CreateProfilingService( + arm::pipe::MAX_ARMNN_COUNTER, initialiser); + m_ReportStructure.value().ReportStructure(*profilingService); m_BackendNotifier.NotifyBackendsForTimelineReporting(); } diff --git a/src/profiling/IReportStructure.hpp b/src/profiling/IReportStructure.hpp index 82a84ff6cf..8891cbd3b0 100644 --- a/src/profiling/IReportStructure.hpp +++ b/src/profiling/IReportStructure.hpp @@ -11,11 +11,13 @@ namespace arm namespace pipe { +class IProfilingService; + class IReportStructure { public: virtual ~IReportStructure() {} - virtual void ReportStructure() = 0; + virtual void ReportStructure(arm::pipe::IProfilingService& profilingService) = 0; }; } // namespace pipe diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index fd2670368b..128e1f15d2 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -1910,7 +1910,7 @@ TEST_CASE("CheckTimelineActivationAndDeactivation") class TestReportStructure : public IReportStructure { public: - virtual void ReportStructure() override + virtual void ReportStructure(arm::pipe::IProfilingService& profilingService) override { m_ReportStructureCalled = true; } |