aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendCounterPacket.hpp
AgeCommit message (Collapse)Author
2020-03-19Creating gh-pages documentation for ArmNNJim Flynn
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-02-14IVGCVSW-4338 Implement the Activation of Counters in backendsFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I4a2465f06e046f78242ff0a246c651638b205498
2020-02-10IVGCVSW-4328 BufferManager running out of buffers crashes applicationSadik Armagan
* Refactored SendCounterPacket classes, separated SendCounterPacket from Send thread * Created ISendThread.hpp, IConsumer, SendThread.hpp and SendThread.cpp * Injected IConsumer to BufferManager to notify SendThread when packet is ready to read Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I80f0bb8b8401c6bfd1611f7760217c6fe35d7ad8
2020-01-14IVGCVSW-4229 Fix Intermittent failures in ExternalProfilingFinn Williams
* Added a BufferManager.Reset() method to prevent packets being retained after a test * Fixed a bug causing the send thread to wait needlessly before moving to active state * Refactored SendCoundPacketTests and ProfilingTests test helper classes * Fixed issue where WaitForPacketSent could miss a notification and timeout Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I353a652260c2f7dd465baa9e979e22f50f3ca6a7
2019-12-04IVGCVSW-4221 Fix SendCounterPacket hanging for indefinite timeFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I612f4d0162e7f35296f7d484350a937f6344fcfb
2019-11-29IVGCVSW-4118 Fix long unit test executionColm Donelan
* Reduced sleep_for timings * Removed duplicate SendStreamMetaDataPacket. * Modified SendCounterPacket::WaitForPacketSent to use wait_for * Modified SendCounterPacket::Send WaitingForAck to use wait_for * Added destructor to StreamRedirector. * Added method SendCounterPacketTests::HasWrittenData * Restructured many tests in ProfilingTests. Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I55c59cac6674ac40a1056a5302a997d5da9e9d91 Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
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-11IVGCVSW-3964 Implement the Periodic Counter Selection command handlerMatteo Martincigh
* Improved the PeriodicCounterPacket class to handle errors properly * Improved the PeriodicCounterSelectionCommandHandler to handle invalid counter UIDs in the selection packet * Added the Periodic Counter Selection command handler to the ProfilingService class * Code refactoring and added comments * Added WaitForPacketSent method to the SendCounterPacket class to allow waiting for the packets to be sent (useful in the unit tests) * Added unit tests and updated the old ones accordingly * Fixed threading issues with a number of unit tests Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I271b7b0bfa801d88fe1725b934d24e30cd839ed7
2019-10-08IVGCVSW-3937 Update the Send thread to send out the Metadata packetMatteo Martincigh
* The Send thread now automatically sends out Stream Metadata packets when the Profiling Service is in WaitingForAck state * Added a reference to the profiling state in the SendCounterPacket class * Moving the RuntimeException thrown in the Send thread to the main thread for rethrowing * The Stop method now rethrows the exception occurred in the send thread * The Stop method does not rethrow when destructing the object * Added unit tests Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ice7080bff63199eac84fc4fa1d37fb1a6fcdff89
2019-10-07IVGCVSW-3937 Make dynamic use the of the profiling connectionMatteo Martincigh
in the SendCounterPacket class * Passing the profiling connection as an argument to the pertinent methods of the SendCounterPacket class, as the connection is created dynamically by the ProfilingService * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ibe72bdbad814a201c4f1505cff4badbb9b03b13e
2019-10-04IVGCVSW-3904 Add more unit tests for send thread with BufferManagerNarumol Prangnawarat
* Add timeout parameter to wait for readable data * Write all readable data to the profiling connection when ready to read * Set ready to read when buffer exhaust * Ensure that readable data get written to profiling connection before the send thread is stopped * Add MockWriteProfilingConnection to be able to test WritePacket * Refactor BufferManager and the unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I80ae01bd8d0119a3a3a957069ae8ac521c005a12
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-25IVGCVSW-3905 Create a first implementation of the send threadMatteo Martincigh
* Added the send thread directly to the SendCounterPacket class * Updated the SendCounterPacket class constructor to also take a reference of a IProfilingConnection object, used to send packets out * Added Start and Stop methods to SendCounterPacket to start and stop the send thread * Added mutex and wait condition to make the send thread waiting for something to send * This implementation used the old IBufferWrapper interface * Added defult (empty) constructor for the Packet class * Refactoring of IPeriodicCounterCapture and SocketProfilingConnection * Modified WritePacket to make it match IBufferWrapper::GetReadBuffer * Added unit test for regular and stress testing of the send thread Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I8175619ff4e65c0d5be99bcd8bd9d8dd87f717c6
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-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