aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingUtils.cpp
AgeCommit message (Collapse)Author
2022-03-23IVGCVSW-6706 Create the libpipeClient libraryJim Flynn
Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-16IVGCVSW-6851 Move DirectoryCaptureCommandHandler to the profiling server libraryJim Flynn
Change-Id: Ib14fdcca15f40fedc0f992b0fd882458dc58c9ba Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-16IVGCVSW-6852 Break the remaining dependencies on Arm NN in the profiling codeJim Flynn
Change-Id: I18b8ca22896567904768170350ee5eb22edd4a22 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-12IVGCVSW-6842 Replace ARMNN_ASSERT with ARM_PIPE_ASSERT in profiling codeJim Flynn
Change-Id: Ie982ae603b7fb2793baf921232d32ce43f46d444 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-10IVGCVSW-6841 Replace armnn::numeric_cast with arm::pipe::numeric_cast in ↵Jim Flynn
profiling code Change-Id: Ib3115694608dee59ced8dc31077e16fe19d0dfea Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-09IVGCVSW-6821 Remove dependency on armnn::Exception classes from the ↵Jim Flynn
Profiling code Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-01IVGCVSW-6704 Change the namespace from armnn::profiling to arm::pipeCathal Corbett
* Updated ABI version to 29 due to being the first ABI break in 22.05 !android-nn-driver:7226 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36
2020-09-29IVGCVSW-5301 Remove all boost::numeric_cast from armnn/src/profilingMatthew Sloyan
* Replaced with armnn/utility/NumericCast.hpp Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I14e89c00cd1dd607315113d5b8ca56c2e9f6c363
2020-07-29IVGCVSW-5166 Pull out the common and server side code into standalone librariesJim Flynn
Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-07-28IVGCVSW-5079 Fix for Timeline decoder segfaults when given bad dataKevin May
* Check packet size/length in ReadSwTraceMessage * Update existing Unit tests * Add new Unit tests Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ie15be8bc289d7bcb354a259312aada5268bff4e4
2020-07-13IVGCVSW-5076 Correct Profiling Stream Metadata packet revision tableJim Flynn
Change-Id: Ic3f8637642d3f3a5925f5b82e3729b3b654a7f3e Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-07-09IVGCVSW-5095 Make timeline report the Linux Thread ID not the pthread IDJim Flynn
Change-Id: Id69519fd9ef57716de4e389ed4156710a904c701 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-06-17IVGCVSW-4900 Update Timeline Directory Message with new fieldsJim Flynn
Change-Id: I68097e176f7471a18498492b50339e68004dddd5 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-05-27IVGCVSW-4735 Add label GUID to timeline eventClass messageJim Flynn
Change-Id: Ie205d8146f5bb1920bf001b7623ead79e2ab9e48 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-05-24IVGCVSW-4734 Add an Attribute label guid to the relationship message to ↵Finn Williams
reduce traffic Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: Ia55c52c12fe3d30eb47bc42c932a33c620dc9197
2020-05-22Bugfix: Profiling use of substr() incorrectly parses semantic versioningFrancis Murtagh
* With semantic versioning ARMNN_VERSION is changed from 20200500 to 21.0.0 causing this function to return "Armnn .0..0" instead of "Armnn 20.1" * Remove the use of substrings and instead use the Major/Minor macros to give the expected output format: "Armnn 21.0" compared to last release's "Armnn 20.02" Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Id255ff154f59e922434f72a68563ccc6126e187a
2020-05-13IVGCVSW-4775 Centralizing definition of ThreadIdSize to fix MLCE-189Colm Donelan
* Introduce a constant definition of the size of a POSIX thread ID. * Update all code to use the new constant definition. * Update all unit tests to use the new constant definition. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I836ab1a77ed13f774e66fd7b425923c24b9a6dab
2020-04-27IVGCVSW-4595 Add IFileOnlyPacketHandlers to file only profiling connectionJim Flynn
Change-Id: Ib49a8cbbf323da4109cdab9750e6c4d276e484b7 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-04-16IVGCVSW-4699 Force timestamps to always be in nanosecondsFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: Id0fef58ff06caae258d9a77132a7ab1ae0c23060
2020-04-06IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
* Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
2020-04-02IVGCVSW-4455 Add an Activate and Deactivate control packet to the protocolKeith Davis
* Add Activate/Deactivate command handlers * Add IReportStructure, INotifyBackends single function interfaces * Add overrided mechanism to report structure in Runtime.cpp * Add overrided mechanism to notify backends in ProfilingService.cpp * Add optional IReportStructure argument to ProfilingService constructor for use in ActivateTimelineReportingCommandHandler * Refactoring and tidying up indentation * Removal of unused code in ProfilingUtils.cpp and ProfilingService.cpp * Added GatordMock end to end test * Fixed an issue with SendCounterPacket sending duplicate packets * Fixed an issue with DirectoryCaptureCommandHandler handling of Optional Signed-off-by: Keith Davis <keith.davis@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I5ef1b74171459bfc649861dedf99921d22c9e63f
2020-03-09IVGCVSW-4541 Modify Timeline Packet constructionKeith Davis
* Changed TimelinePacket encoding so that there is only one header for multiple timeline swtrace messages * Refactored function names to have more suitable description * Refactored CodeStyle to coincide with ArmNN coding standards * Refactored profiling test names to be descriptive * Refactored ErrorCode name to TimelineStatus * Updated existing unit tests Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I83bd4bb9e7393617bca97eba96a6e1388916e5b0
2020-02-28IVGCVSW-4454 Remove the CounterSet and Device fields from CategorySadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I721f59cd1f6d068e02dabd62c42871a43be9d934
2019-12-13IVGCVSW-4178 Add code to increment the 3 ArmNN countersKeith Davis
* Increment at Runtime.cpp | BackendRegistry.cpp | LoadedNetwork.cpp * Update unit tests * UID generation is now handled by backends Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ifa53763409078c14839675206d8b260cdc36a8df
2019-11-15IVGCVSW-4072 Add stream header to Timeline Message Directory packetMatteo Martincigh
* Refactored the WriteTimelineMessageDirectoryPacket function * Added the stream header to the packet * Updated decoders/parsers * Updated unit tests accordingly * Minor refactoring Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I58f15fde54adc6414ca9fd5fb8d6157cad867339
2019-11-07IVGCVSW-3951 Create the timeline decoderFinn Williams
* Added ITimelineDecoder.h C interface * Added an example implementation of ITimelineDecoder.h * Added command handlers for the timeline directory and objects * Added tests for the decoder implementation * Changed ReadSwTraceMessage to take a const unsigned char* so it can be used by the directory command handler * Fixed some bugs in ProfilingUtils.cpp and related tests Change-Id: If06faf1fe0274a8f022f194a6d3527f5ce5374c6 Signed-off-by: Finn Williams <Finn.Williams@arm.com>
2019-11-06IVGCVSW-4065 Add a RecordEvent functionMatteo Martincigh
* Added RecordEvent utility function to the TimelineUtilityMethods class * Added new utility function to get a timestamp * Added unit tests Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ia3f8fe7397915fa6c903ce0c0abab3047cea628c
2019-11-06IVGCVSW-3444 File Only Profiling ConnectionKeith Davis
* Add FileOnlyProfilingConnection Decorator * Fix bug where Conn Ack not automatically sent back * Modify GatordMock to use the Counter Directory class. * Promote DirectoryCaptureCommandHandler from GatordMock into ArmNN. * Remove MockUtils as it's contents were moved or deleted. * Rewrite GatordMockTests to use Counter Directory class. * Flush streams in ProfilingConnectionDumpToFileDecorator::Close. Signed-off-by: Keith Davis <keith.davis@arm.com> Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I77b2aedece24150dd31691b577f3b5d81b2e226f
2019-11-05IVGCVSW-4065 Use platform-specific thread id size in Timeline packetsMatteo Martincigh
* Using std::thread::id as a general data type for thread id * Added new profiling util functions for reading/writing a thread id to/from a buffer * Fixed code and unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I1aaa3bdb740c8a97010f655b1e9f7581b52e7aff
2019-11-05IVGCVSW-4065 Refactor the IPacketBuffer smart pointersMatteo Martincigh
* Added convenience "using" statement for the unique pointers to IPacketBuffer * Replaced all the occurrencies in the code Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Iffec3a425ffbc1ecb23012971563a48139eb32eb
2019-10-24IVGCVSW-3950 Create SendTimelinePacket interface and classSadik Armagan
* Implemented ISendTimelinePacket interface and its implementation SendTimelinePacket * Implemented TimelinePacketWriterFactory * Implemented unit tests for SendTimelinePacket functions Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I0a47586437f99510394d4d94589dccfb397d38e5
2019-10-16IVGCVSW-3930 Create the Timeline Relationship Binary PacketNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ia3f93a25cd26c6d9116c2112d1e8d07be438bf39
2019-10-16IVGCVSW-3931 Create the Timeline Event Binary PacketMatteo Martincigh
* Added WriteTimelineEventBinaryPacket function * Added unit tests * Code refactoring Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I36b6a8b26bb46eb5ea97bb711ef7e153ea6d851f
2019-10-16Refactor ProfilingUtilsJan Eilers
* Added decl_id to all swtrace stream messages * Adjusted unit tests to include decl_id * Refactored code to reduce code duplication Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I7a607765d9e65b1c08e4f914acbeda392400f6a4
2019-10-16IVGCVSW-3929 Create the Timeline Event Class Binary PacketJan Eilers
* Added some utility functions * Added WriteTimelineEventClassBinaryPacket * Added related unit tests Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ib1fca3f8642bf5bbddb5ce51f2d90581a86359b1
2019-10-08IVGCVSW-3926 Create the Timeline Message Directory PackageSadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I8be40f2e6f1f916b2566ca4d9e87b38d27eb7730
2019-10-07IVGCVSW-3928 Add the Timeline Entity Binary PacketDavid Monahan
Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: If3dda4c5ba5c79e4bade58e14fc4df677cb2f5a1
2019-10-03IVGCVSW-3927 Create the Timeline Label Binary PacketMatteo Martincigh
* Added a new utility function to create a Timeline Label Binary Packet and write it to a given buffer * Added new enumeration to be reused for subsequent utility functions * Added unit tests Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Icbabefb9050f3f3b1a30082eabf875593378001f
2019-09-26IVGCVSW-3902 Create IReadOnlyPacketBuffer, IPacketBuffer and IBufferManager ↵Narumol Prangnawarat
interfaces * Create IReadOnlyPacketBuffer, IPacketBuffer and IBufferManager interfaces * Add Read and Write util functions that use IPacketBuffer * Add MockBufferManager using IBufferManager for testing * Modify SendCounterPacket to use IBufferManager * Modify MockStreamCounterBuffer to use IBufferManager * Remove IBufferWrapper and MockBuffer * Add MockPacketBuffer for testing * Modify unit tests to use the new interfaces Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ib86768187e032f07169aa39367a418b7665c9f03
2019-09-18IVGCVSW-3691 Implement SendCounterPacket.SendCounterDirectoryPacket() functionMatteo Martincigh
* Changed the signature of SendCounterDirectoryPacket to accept any ICounterDirectory object * Added helper methods to the SendCounterPacket class for creating the records * Created mock classes for testing * Added unit tests for both SendCounterDirectoryPacket and the helper methods * Added unit tests for the SWTrace utility functions * Added ReadUint8 utility function for getting single byte out of a buffer * Disabled extra sign-conversion warning in the conversion macro Change-Id: Ie2dddcd6824ed07b623f0cd78d9b7d05c5b70c39 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-09-17IVGCVSW-3691 Rework the CounterDirectory class to take into considerationMatteo Martincigh
the connections between components * Added constructors and connections to the profiling classes * Used hash table to keep track of the profiling objects by UID * Added register methods * Added find/check helper methods * Updated the makefile to include the profiling directory * Added unit tests for the CounterDirectory class * Added ICounterDirectory interface class for read-only use * Added custom macro to locally disable conversion warnings Change-Id: I3f53a68663ee77b8d03ac0ef7dc01e90c6893511 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-09-09IVGCVSW-3691 Add utility function to generate valid UIDs for profiling objectsMatteo Martincigh
Change-Id: I59ad320bfd52c881671c5e4710fb70c5d0293aad Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-09-09IVGCVSW-3691 Basic refactoring in view of upcoming work in the profilerMatteo Martincigh
Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-09-09IVGCVSW-3690 Implement SendCounterPacket.SendStreamMetaDataPacket() functionFerran Balaguer
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: I9e034b0caaff5371fadfdba20fdbe3171d4cd2e6
2019-09-05IVGCVSW-3692 Implement SendPeriodicCounterCapturePacket() functionFrancis Murtagh
Change-Id: Ic976fc36955bec5e7721d1e34e89e7be79e23053 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-09-03IVGCVSW-3693 Implement ↵Ferran Balaguer
SendCounterPacket.SendPeriodicCounterSelectionPacket() function Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: Ib034a4f5ca589759d925e3dd0ca50e5a3dfa74c5