aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingUtils.cpp
AgeCommit message (Collapse)Author
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