QNX Momentics Development Suite Tools for Building Debugging
QNX® Momentics® Development Suite Tools for Building, Debugging and Optimizing Embedded Systems
Agenda 1. Eclipse and CDT Introduction 2. QNX® Momentics® Development Suite 3. Target Management 4. Embedded System Debugging 5. Embedded System Profiling 6. Application Analysis: Memory, Code Coverage, Performance 7. Multi-core Systems Development 8. Embedding the Operating System and Applications 9. Q&A All content copyright of QNX Software Systems Co. 2
QNX® Momentics® Development Suite Eclipse and CDT Introduction
What is Eclipse? è Eclipse is - a vast open source community ► 17 Strategic Members, 79 Add-in Provider Members, many independent contributors ► Widely adopted § 50 million downloads since 2001 (as of 2005) § 1 million downloads of Callisto (3. 2) 40 days after release è Eclipse is - A collection of open source projects ► è “providing an extensible development platform and application frameworks for building software” (www. eclipse. org) Eclipse is – A platform ► Core Runtime, GUI, and IDE features ► An SDK for building plug-ins for the Platform All content copyright of QNX Software Systems Co. 4
History of Eclipse è Originated at IBM in 2000 è Foundation for Web. Sphere Studio Application Developer® ► è IBM had vision to see the value of open source technologies ► è Good experience with Apache and Linux Formed Eclipse Consortium November 2001 ► è Intended to compete with Microsoft® Visual Studio® in enterprise Involved both partners and competitors Gave technology and leadership to Eclipse Foundation ► February 2004 ► Combat the perception that IBM still owned Eclipse All content copyright of QNX Software Systems Co. 5
What is the CDT? è One of the major Eclipse tools projects è A set of plug-ins that support C and C++ development ► Extend many of the Eclipse Platform extension points è Support Edit/Build/Debug cycle è Out-of-the-box support for gnu tools for host development ► è Platform for integrating other toolchains ► è gcc, g++, gdb, binutils, etc. Compilers, debuggers, build systems, … Platform for adding other C/C++ tooling ► Embedded tools to support unique needs of embedded systems All content copyright of QNX Software Systems Co. 6
History of the CDT è Project launched July 2002 ► è At QNX headquarters in Ottawa, Canada Initially populated with contribution from QNX Additional participation from Rational, Monta. Vista, and Red Hat ► Again, both partners and competitors ► è CDT releases regularly with latest being 3. 1. 1 in Sept 2006 è Contributions from: ► ► ► QNX - initial contribution, core and debug Rational/IBM - parser technologies Intel and Texas Instruments - makefile generation Wind River - refactoring Others coming… All content copyright of QNX Software Systems Co. 7
QNX is Committed to Eclipse and CDT QNX is a founding member of the Eclipse Consortium è QNX contributed the original implementation of the CDT to Eclipse and has guided the evolution of the CDT project, from its humble beginnings of 80, 000 LOC to over 700, 000 LOC today è The CDT is the second most popular project on Eclipse, following only the Eclipse platform itself è è Simultaneously leverage open standards like Eclipse while taking advantage of high value-add functionality and world-class innovation through standardized extension points Designed for embedded: cross-compiler support, easy debugging, extended for target management ► Seamless support for third-party plug-in tools and optimizing compiler technology ► High developer productivity: no additional learning curve, high performance IDE, reliable platform, scalable to large projects ► All content copyright of QNX Software Systems Co. 8
Who creates products that include the CDT? There are over 17 commercially available products based on Eclipse and CDT All content copyright of QNX Software Systems Co. 9
QNX® Momentics® Development Suite Overview
QNX® Momentics® at a Glance All content copyright of QNX Software Systems Co. 11
Built on the Eclipse Platform All content copyright of QNX Software Systems Co. 12
QNX® Momentics® Development Suite Target Management
Target Management è Embedded systems need to be monitored, debugged and controlled remotely ► Much of complexity and difficulty with embedded development is the limited insight into the operation of the target system All content copyright of QNX Software Systems Co. 14
Target Management Network/Serial/Other è QNX Momentics adds target management to Eclipse ► Observe and control running target (memory, threads, processes) ► Manipulate file system ► Download, debug, control and optimize applications All content copyright of QNX Software Systems Co. 15
Target Management - Memory Target navigation All content copyright of QNX Software Systems Co. 16
Target Management - Memory Map Memory Details All content copyright of QNX Software Systems Co. 17
Target Management – File System File Details File System Explorer All content copyright of QNX Software Systems Co. 18
Target Management – Adaptive Partitioning Partition Information Partition Explorer CPU Usage Per Partition Budgets All content copyright of QNX Software Systems Co. 19
QNX® Momentics® Development Suite Embedded Systems Debugging
Embedded System Debugging Network/Serial/Other è QNX Momentics embedded debugging to Eclipse ► Full source debugging on remote target ► Start, stop, and step multiple processes and threads ► Observe variables, globals, memory, registers All content copyright of QNX Software Systems Co. 21
Embedded Systems Debugging Process and Thread Information Source View with current executing code All content copyright of QNX Software Systems Co. 22
Embedded Systems Debugging Execution control Variables and data structures Registers All content copyright of QNX Software Systems Co. 23
QNX® Momentics® Development Suite Embedded Systems Profiling
Profiling an Embedded System è Very low overhead, high performance buffering of kernel events è Snapshots of activity are captured and sent to the IDE è IDE visualizes events in graphs and tables for analysis All content copyright of QNX Software Systems Co. 25
System Profiler – Kernel Events Thread Migration Thread state change Inter-Process Communication All content copyright of QNX Software Systems Co. 26
System Profiler – CPU Utilization CPU Usage All content copyright of QNX Software Systems Co. 27
System Profiler – Measuring Interrupt Latency Interrupt arrives – Kernel handles it Kernel sends message to handler thread Thread begins to run All content copyright of QNX Software Systems Co. 28
System Profiler – Multi-Core Support CPU Usage by Thread All content copyright of QNX Software Systems Co. Cumulative Graph 29
System Profiler – Multi-Core Support CPU Utilization CPU Usage All content copyright of QNX Software Systems Co. 30
System Profiler – Multi-Core Support Running CPU by Color Code Mouse Hover CPU Information All content copyright of QNX Software Systems Co. 31
System Profiler – Multi-Core Support Thread Migrations vs Time Top Thread Migrations All content copyright of QNX Software Systems Co. 32
System Profiler – Multi-Core Support Inter-core Messages List of Top Inter-core Senders/Receivers All content copyright of QNX Software Systems Co. 33
System Profiler – Adaptive Partitioning Support Partition Summary Process/Thread Summary All content copyright of QNX Software Systems Co. 34
System Profiler – Adaptive Partitioning Support Mouse Hover Partition Information All content copyright of QNX Software Systems Co. 35
QNX® Momentics® Development Suite Application Analysis: Memory, Code Coverage, Performance
Embedded Application Analysis è Embedded development requires debugging and optimization of the application on the target system è Memory analysis can reveal difficult to debug system crashes or memory leaks that cause long-term instability è Code coverage can reveal deficiencies in the testing process ► è If you haven’t tested the code your customers probably will Application profiling can reveal performance bottlenecks ► Where is the CPU being used? ► Why is my application freezing when certain things happen? All content copyright of QNX Software Systems Co. 37
Memory Analysis – Error Discovery Back Trace Error Report Source View All content copyright of QNX Software Systems Co. 38
Memory Analysis - Profiling Session Information & File Navigation Back Trace Allocation/Deallocation History Source View All content copyright of QNX Software Systems Co. 39
Memory Analysis - Profiling Details Memory allocation request histogram Timeline View All content copyright of QNX Software Systems Co. 40
Memory Analysis - Profiling Trace Details Memory Usage with Overhead Memory Usage Vs Time All content copyright of QNX Software Systems Co. 41
Memory Profiling - Optimization Trace Details Band Histogram (based on memory allocation algorithm) Block Usage Vs Time All content copyright of QNX Software Systems Co. 42
Code Coverage Web Report Session Information & File and Function Navigation Source View All content copyright of QNX Software Systems Co. 43
Code Coverage – Web Report File & Function Navigation Coverage Statistics Source View All content copyright of QNX Software Systems Co. 44
Performance - Application Profiling Per Thread Usage Session CPU Usage Summary Source View Detail Call Graph All content copyright of QNX Software Systems Co. 45
QNX® Momentics® Development Suite Multi-core System Development
Symmetric Multiprocessing for Multi-core Systems è è Highly scalable supporting multiple processing cores seamlessly without code modification QNX Neutrino One OS “sees all” and handles all resource sharing / arbitration issues è Dynamic load balancing can handle processing bursts with OS controlled thread scheduling è High performance inter-core messaging and thread synchronization è Core-to-core application synchronization using POSIX OS primitives è Applications System wide statistics / information gathering capability for performance optimizations, debugging, etc. All content copyright of QNX Software Systems Co. CPU Cache System Interconnect I/O I/O Memory Controller Memory 47
Multi-core System Profiling Observe CPU Utilization per Node Find Computeintensive Processes All content copyright of QNX Software Systems Co. 48
Exploiting Parallelism – Application Profiling Use call graph to find CPU usage – candidates for parallelization All content copyright of QNX Software Systems Co. 49
Multithreading Compute Intensive Operations è è Single threaded application ► Several computeintensive functions ► Identified through profiling Create worker threads for compute-intensive functions ► Neutrino OS will schedule to multiple CPUs ► Improve throughput All content copyright of QNX Software Systems Co. 50
Monitor Thread Migration/Inter-core Communication è All content copyright of QNX Software Systems Co. Monitor application after parallelization ► Watch for heavy thread migration ► Watch for heavy IPC 51
Bound Multiprocessing è Set CPU affinity for processes and threads ► Lock down thread/process to CPU All content copyright of QNX Software Systems Co. 52
QNX® Momentics® Development Suite è Embedding the Operating System and Applications
Embedding the OS and Applications è Embedded systems require operating system and applications to be bundled into a boot image è Tools are needed to simplify the work of creating a boot image è QNX Momentics provides the System Builder which provides tools in Eclipse to: ► Create boot image from OS, binaries, libraries and DLLs ► Startup script editing ► Built-in TFTP server ► Serial terminal All content copyright of QNX Software Systems Co. 54
Embedding the OS - System Builder All content copyright of QNX Software Systems Co. 55
Embedding the OS - System Builder Image Navigator Binary and File System Builder Binary Inspector Built-in TFTP Server All content copyright of QNX Software Systems Co. Serial Terminal 56
Embedding the OS – Image Builder Binaries, Libraries, DLLs, etc. All content copyright of QNX Software Systems Co. Boot File System Structure 57
Summary è QNX is a leading and active contributor to Eclipse and the CDT è Embedded development requires more than basic IDE functionality è ► Target management ► Embedded Debugging ► System Profiling ► Application Analysis ► Tools ready for Multi-Core Development QNX Momentics Development Suite is open, extensible and ready for embedded development All content copyright of QNX Software Systems Co. 58
Thank you! Questions and Answers
- Slides: 59