aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test
AgeCommit message (Collapse)Author
2019-10-07IVGCVSW-3937 Refactor the command threadMatteo Martincigh
* Integrated the Join method into Stop * Updated the unit tests accordingly * General code refactoring Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: If8537e77b3d3ff2b780f58a07df01191a91d83d2
2019-10-07IVGCVSW-3937 Initial ServiceProfiling refactoringMatteo Martincigh
* Made the ServiceProfiling class a singleton * Registered basic category and counters * Code refactoring * Updated unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I648a6202eead2a3016aac14d905511bd945a90cb
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-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-10-03IVGCVSW-3440 Fix intermittently failing send thread testMatteo Martincigh
* Simplified the implementation of the MockStreamCounterBuffer * Minor refactoring Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I3aed97daee0ac32d384e1f830e8cc57aae84950b
2019-09-30IVGCVSW-3903 Create Counter Stream BufferNarumol Prangnawarat
* Add implementation of PacketBuffer * Add implementation of BufferManager * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Icca3807149ff5a8ed31cc87de73c50b95bca39d4
2019-09-27IVGCVSW-3442 Add ProfilingConnectionDumpToFileDecoratorAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I3a8313287c69268ae02b6a65103363e9fbba6b4a
2019-09-27IVGCVSW-3557 Return IProfilingConnection from ProfilingConnectionFactorySadik Armagan
* Remove WaitingForAck test, test std::cerr instead Signed-off-by: Kevin May <kevin.may@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I968c53dc005ff078ed08faf8818c83cb2a41528a
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-25IVGCVSW-3411 Add the Counter Values array and accessor methodsFinnWilliamsArm
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I4fa2428a83b93cbe58b821344206e2f7ce9e37e7
2019-09-24IVGCVSW-3439 Create the Command ThreadFinnWilliamsArm
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I9548c5937967f4c25841bb851273168379687bcd
2019-09-24IVGCVSW-3691 Fix the Counter Directory Packet data lengthMatteo Martincigh
* The data_length field in the header represents only the size of the data included in the packet after the header, so the header size is not included * Removed a number of conversion macros in SendCounterPacket by using numeric casts where possible * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ifb23c341c442ff3d33b234d4213b739a77ceb658
2019-09-23IVGCVSW-3413 Add the Counters MetadataFinnWilliamsArm
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I1313320a28b2d17d1adbc80248882ef458c34a14
2019-09-23IVGCVSW-3437 Add Request Counter Directory Command HandlerNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I56ef68d6fe993d271a0fc43467f2a63cdcaee496
2019-09-20IVGCVSW-3433 Create the Periodic Counter Capture ThreadFrancis Murtagh
* Add Periodic counter thread object * Add Unit test for thread * Move MockBuffer to header file to allow reuse Change-Id: Id2a8ea636723ab35e8a50efc200c8c76059bba02 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-09-19IVGCVSW-3430 Connection Acknowledged Command Handler ImplementationSadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I0ba97a93edb283b37bd1c089c668135a4bf9550c
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-18IVGCVSW-3432 Fix a multithread store conflictJim Flynn
* Unit test was using the same CaptureData object across 50 threads Change-Id: I0249b5a8e0bb05e3d3efdd855f5b34b1d5ef3dc9 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-09-18IVGCVSW-3691 Add extra unit tests to complete coverage forMatteo Martincigh
the CounterDirectory class Change-Id: I37c6d2b43d3994878c8daeeb0ff226bf411c0aae 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-16IVGCVSW-3826: Implement IProfiling functionsFinnWilliamsArm
!armnn:1814 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I82c7453d7969880e321572637adc0fb9c0e5fd7b
2019-09-16Split out basic CaptureData unit tests from Holder testsMatthew Bentham
Change-Id: I68f62c2941c4af77a48829bbc71d5836d9477b5d Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
2019-09-13IVGCVSW-3872 Add Missing packet to SendMetaDataPacketFerran Balaguer
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: I98d8b22bdc447c2ff3f4d74d58ef9c0eae75db76
2019-09-13IVGCVSW-3436 Create the Periodic Counter Selection Command HandlerFerran Balaguer
Change-Id: Ia6fe19db5aebe82bb00dcbab17e16633befda0a5 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com>
2019-09-12IVGCVSW-3580: Extend the IProfilingConnection to connect to a SocketTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Aron Virginas-Tar <aron.virginas-tar@arm.com> Change-Id: I72e099ee00052f7a0907c055c7bff02c7d8fde86
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-3432 Create CaptureData HolderFrancis Murtagh
* Improve tests with greater number of threads Change-Id: I6855cdee463809045b10fff85ed9193dd3d3207a Signed-off-by: Francis Murtagh <francis.murtagh@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-3674 Create basic ProfileService classKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I5bed5196c256883fb704fe14b60bb8f7a77cc9df
2019-09-05IVGCVSW-3432 Create CaptureData HolderFrancis Murtagh
* Fix race condition where result was read before execution of write Change-Id: I8961c4ce5a9000cb4d465106fe56e615beecf4dc Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-09-05IVGCVSW-3692 Implement SendPeriodicCounterCapturePacket() functionFrancis Murtagh
Change-Id: Ic976fc36955bec5e7721d1e34e89e7be79e23053 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-09-04IVGCVSW-3432 Create CaptureData HolderFrancis Murtagh
* Create CaptureData and Holder classes * Add unit test Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I9f2766a8a6081ae4f9988904af2ca24cd434ebca
2019-09-03IVGCVSW-3431 Create Profiling Service State MachineNikhil Raj
Change-Id: I30ae52d38181a91ce642e24919ad788902e42eb4 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
2019-09-03IVGCVSW-3693 Implement ↵Ferran Balaguer
SendCounterPacket.SendPeriodicCounterSelectionPacket() function Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: Ib034a4f5ca589759d925e3dd0ca50e5a3dfa74c5
2019-09-02IVGCVSW-3434 Create the SendCounterPacket interfaceFerran Balaguer
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: I0d9b0ab12f17cb86544163ce3f0dc4945151e9e1
2019-08-23IVGCVSW-3427 Create PacketVersionResolver classAron Virginas-Tar
* Create first version of PacketVersionResolver class * Add basic unit test * Move existing classes inside the armnn::profiling namespace * Add utility methods for Version Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: If0ea0e1b9dea7fbfcd8b808e97b1e2aa91964dfa
2019-08-19IVGCVSW-3429 Add a utility Version classNikhil Raj
Change-Id: Id429f7d9176c775953c1261c5a3e9f1d565927c1 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
2019-08-16IVGCVSW-3550 Create Command Handler RegistryFrancis Murtagh
Change-Id: I51e34068d79ba660ae2f16b22ad2bb8191d473fa Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-08-16IVGCVSW-3425 Create the Command Handler Functor base classFrancis Murtagh
Change-Id: I59ac9b32ac594161bdc5e1de2cdee02d79fc1992 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-08-15IVGCVSW-3415 Create the Packet ClassNikhil Raj
Change-Id: Ie59e82e7f87f5ba6496aa8579bc9d40360d90999 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
2019-08-14IVGCVSW-3416 Create Command Handler Key classFrancis Murtagh
* Add CommandHandlerKey class with all comparison operators * Add UnitTests to check key sorting in collection Change-Id: Icbd493d1e51e681cbe22a9e70ab9428a8a2ad107 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>