diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-08 21:23:44 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-09 22:14:52 +0000 |
commit | f9db3efe5ce2b989b59c47056e1b84b32d2f1100 (patch) | |
tree | b1fd75d5f951f9036a8f0b37211fc30b4d651262 /src/profiling/SendCounterPacket.cpp | |
parent | 0e5588f3289845d1bd7597ade081764018eda2cc (diff) | |
download | armnn-f9db3efe5ce2b989b59c47056e1b84b32d2f1100.tar.gz |
IVGCVSW-6821 Remove dependency on armnn::Exception classes from the Profiling code
Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r-- | src/profiling/SendCounterPacket.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp index 38417e8ecd..c91a02acce 100644 --- a/src/profiling/SendCounterPacket.cpp +++ b/src/profiling/SendCounterPacket.cpp @@ -4,15 +4,17 @@ // #include "SendCounterPacket.hpp" + +#include <common/include/Constants.hpp> #include <common/include/EncodeVersion.hpp> +#include <common/include/ProfilingException.hpp> +#include <common/include/SwTrace.hpp> -#include <armnn/Exceptions.hpp> #include <armnn/Conversion.hpp> #include <Processes.hpp> + #include <armnn/utility/Assert.hpp> #include <armnn/utility/NumericCast.hpp> -#include <common/include/Constants.hpp> -#include <common/include/SwTrace.hpp> #include <fmt/format.h> @@ -88,7 +90,7 @@ void SendCounterPacket::SendStreamMetaDataPacket() if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow<BufferExhaustion>( + CancelOperationAndThrow<arm::pipe::BufferExhaustion>( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -164,7 +166,7 @@ void SendCounterPacket::SendStreamMetaDataPacket() } catch(...) { - CancelOperationAndThrow<armnn::RuntimeException>(writeBuffer, "Error processing packet."); + CancelOperationAndThrow<arm::pipe::ProfilingException>(writeBuffer, "Error processing packet."); } m_BufferManager.Commit(writeBuffer, totalSize, false); @@ -584,7 +586,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateDeviceRecord(device, deviceRecord, errorMessage)) { - CancelOperationAndThrow<armnn::RuntimeException>(errorMessage); + CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage); } // Update the total size in words of the device records @@ -619,7 +621,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage)) { - CancelOperationAndThrow<armnn::RuntimeException>(errorMessage); + CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage); } // Update the total size in words of the counter set records @@ -654,7 +656,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateCategoryRecord(category, counterDirectory.GetCounters(), categoryRecord, errorMessage)) { - CancelOperationAndThrow<armnn::RuntimeException>(errorMessage); + CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage); } // Update the total size in words of the category records @@ -807,7 +809,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow<BufferExhaustion>( + CancelOperationAndThrow<arm::pipe::BufferExhaustion>( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -844,7 +846,7 @@ void SendCounterPacket::SendPeriodicCounterCapturePacket(uint64_t timestamp, con if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow<BufferExhaustion>( + CancelOperationAndThrow<arm::pipe::BufferExhaustion>( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -893,7 +895,7 @@ void SendCounterPacket::SendPeriodicCounterSelectionPacket(uint32_t capturePerio if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow<BufferExhaustion>( + CancelOperationAndThrow<arm::pipe::BufferExhaustion>( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } |