Tracing embedded heterogeneous systems P R O G R E S S R E P O R T M E E T I N G, M A Y 2 0 1 6 T H O M A S B E R T A U L D D I R E C T E D B Y M I C H E L D A G E N A I S May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 1
Presentation plan 1. Introduction 2. The Keystone 2 architecture 3. BareCTF 4. Tracing embedded heterogeneous systems 5. The synchronization process 6. Use-case 7. Conclusion May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 2
Introduction - Why tracing heterogeneous embedded systems? Have you ever wondered how images get processed inside these cameras? May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 3
Introduction - Why tracing heterogeneous embedded systems? Systems designed for specific needs/tasks Often used for real-time applications like signal processing Can be used anywhere Power-efficient Used inside much more complex systems May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 4
Introduction - Challenges Different kind of processors Some may be «unconventional» ones Some may be «bare-metal» ones Complex and specialized hardwares Limited resources No internal storage Little RAM Lack of traditionnal tools May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 5
The Keystone 2 - Specifications 66AK2H TI SoC 4 ARM Cortex A15 running Linux (1.4 GHz) 8 C66x TI CorePacs DSPs (1.2 GHz) 2 GB DDR3 6 MB Multicore Shared Memory http://www.ti.com/product/66ak2h12 May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 6
The Keystone 2 - Benefits and drawbacks Broadly used TI DSPs Powerful SoC 8 processors with built-in signal processing abilities TI s SYS/BIOS modules Full C support on the DSPs No way of tracing the DSPs Complex to use May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 7
BareCTF - Tracing bare-metal systems Python tool created by Philippe Proulx (EfficiOS) Targets bare-metal systems Generates CTF traces Easy-to-use (configuration by YAML files) Lightweight https://github.com/efficios/barectf May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 8
Tracing embedded heterogeneous systems - Facts and goal LTTng can be used to trace the ARM side of any board BareCTF can be used to trace every other type of cores For what end? Trace the whole application s chain Detect anomalies, bottlenecks, latencies Have a global view of a process distributed between different type of cores May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 9
Tracing embedded heterogeneous systems - Challenges BareCTF must be ported to any new platform The traces obtained from different processors must be synchronized Necessity to generate matching events in each trace Interrupt-based mechanism May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 10
The synchronization process - Description ARM Generic core SYNC Generic cores ARM May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 11
The synchronization process - Description ARM Generic core SYNC ACK Generic cores ARM May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 12
Use-case - Description Instrumentation of an image processing algorithm Edge detection Sobel s filter May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 13
Use-case - Setup 3000*3000 bmp image 1 ARM process acting as master Gives commands Sends input image and receives result 8 DSPs running acting as slaves Wait for commands Use TI s ImgLib for image processing In charge of memory management May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 14
Use-case - Results May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 15
Use-case - Results Low impact ~95ms to ~96ms of processing time Effective Can show if the work isn t well balanced Allows to keep track of the overall process Uses TraceCompass internal traces synchronization mechanism May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 16
Conclusion - Limitations The barectf platform can be improved Heavy API High latency Wasted memory The synchronization doesn t take drift in account May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 17
Conclusion - Future work Switch to more efficient message-passing methods Determine an optimal synchronization rate Improve the overall overhead of the barectf platform Tests on more complex systems May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 18
Thank you for your attention! Contact : thomas.bertauld@gmail.com May 5th 2016 TRACING EMBEDDED HETEROGENEOUS SYSTEMS 19