Multicore System Analyzer
From Texas Instruments Embedded Processors Wiki
Overview
System Analyzer is a suite of tools that provide real-time visibility into the performance and behavior of your code, and allow you to analyze information that is collected from software and hardware instrumentation in a number of different ways.
Advanced Tooling Features:
- real-time event monitoring
- multicore event correlation
- correlation of software events, hardware events and CPU trace
- real-time profiling and benchmarking
- real-time debugging
Analysis Features
- Benchmarking: Finding out how long it takes some action to complete. Includes 'context aware' benchmarking for multi-threaded analysis
- CPU and Task Load Monitoring: real-time visibility into how busy your system really is
- O/S Execution Monitoring: monitoring task switches and the state of kernel objects such as semaphores
- Filtering events
- Multicore Event Correlation
More information on these features is provided in the System Analyzer User's Guide (shipped with the product and a link is provided below).
The Unified Instrumentation Architecture (UIA)
Unified Instrumetation Architecture (UIA) is the target-side package (included in System Analyzer) which defines the APIs, transports, interfaces and guidelines that enable developers to instrument embedded software in a way that is portable and flexible, and enables the creation of advanced tooling features that can be used both in the lab and in the field.
Portable and Flexible:
- ISA independent: can be re-used across a wide range of TI platforms, single-core devices and multi-core devices
- O/S independent: not tied to any specific operating system
- Transport independent: can use a wide variety of different transports to upload software events from the target to the host, without having to change the source code
- Platform independent: Host-side tooling works on both Windows and Linux platforms
- IDE independent: Host-side tooling will support both tight integration with Code Composer Studio and stand-alone operation for use with other IDEs.
System Analyzer together with it's UIA package define an instrumentation framework that enables the development of instrumentation client tools, instrumented target content, infrastructure components, and instrumentation middleware components that interoperate and can be re-used across TI platforms and devices. This framework enables the creation of interactive and script-driven tools capable of providing developers with insight into the operation and real-time dynamics of application software, software components and silicon devices within the context of the system they are running on.
The Unified Instrumentation Architecture framework includes:
- a messaging infrastructure that allows instrumentation clients to interact with instrumentation endpoints on a target device while the target is running
- an extensible set of commands and messages that can be sent over the messaging infrastructure
- protocols to be used by the target-side instrumentation framework and the host-side instrumentation client
- built-in instrumentation for DSP/BIOS for 'out of the box' real-time visibility into the operation of the O/S
- guidelines on how to instrument other RTOSes
Releases
System Analyzer is being released in multiple ways:
- System Analyzer 1.0 Beta 2 is installed as part of the MCSDK Beta 2 installer
- System Analyzer 1.0 GA is installed as part of the MCSDK GA installer
- UIA package is delivered as part of the DM816X SDK
- System Analyzer 1.0 will be available as a Code Composer Studio Update for CCSv5.0
- System Analyzer 1.0 will be include in CCS v5.1
Available features
| FEATURE | System Analyzer 1.0 Beta 2 | System Analyzer 1.0 GA |
| Ethernet transport | x | x |
| JTAG Stop-mode transport | x | x |
| JTAG Run-mode Transport | x | x |
| Execution Graph | x | x |
| CPU Load | x | x |
| Task Load | x | x |
| Benchmark/Duration Analysis | x | x |
| Context Aware Profile | x | x |
| Statistics/Count Analysis | - | x |
Other components/products
Depending on your requirements, a number of different components/products may be involved in utilizing System Analyzer, including:
- Target Software packages:
- UIA: Unified Instrumentation Architecture APIs - XDC: eXtended C tools and software - IPC: Inter-processor communications library - NDK: Network Developers Kit - BIOS: DSP/BIOS and SysBIOS RTOS
- Host side tooling
- DVT: the Data Visualization Toolkit - CCS: Code Composer Studio: An eclipse-based Integrated Development Environment
Software Development Kits that include System Analyzer:
- MCSDK - DM816X SDK
Road Map
| FEATURE | System Analyzer 1.1 | Future |
| ETB Draining via UIA | x | |
| CPU Trace, STM and UIA Correlatin | x | |
| Logging on Linux | x | |
| Tighter integration with CCS | x | |
| Realtime Config & s/w instrumentation control | x | |
| USB Transport | x | |
| STM Transport | x | |
| Remote Debugging | x | |
| Back Trace | x |
Installation
CCS5.1
System Analyzer is included in CCS5.1 M6 and newer. It is not supported for earlier versions of CCS5.1.
CCS5.0
For users installing the MCSDK, System Analyzer will automatically be installed as part of the MCSDK installer. For non-MCSDK installation see Getting Started Guide below on how to install System Analyzer.
UIA Target Content Packages
If you need to use a different release of the UIA Target Content package than the one that is installed with CCS, you can download it from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/uia/index.html. (See the Release Notes for compatibility info. etc.)
Getting Started Guide
The System Analyzer Getting Started Guide provide information on:
- Installing System Analyzer (only applies to CCS5.0. System Analyzer is included in CCS5.1)
- Getting started with System Analyzer using sample csv file
- Building, running and analyzing an instrumented application
User's Guide
The System Analyzer User's Guide contain complete information on:
- System Analyzer Overview
- Installing System Analyzer
- Performing different System Analyzer tasks
- Using System Analyzer in Code Composer Studio
- Configuring and instrumenting target application
Videos
Tutorials
- The System Analyzer Tutorials provide a series of projects that you can build and use, along with step-by-step walkthroughs of how to configure your code, set up System Analyzer, work with Analysis Features, etc.
Slides and Other Documents
The Analysis Suite Slides Analysis Suite Slides provide an overview of key analyzers tools available.
System Analyzer and the MCSDK Demo
- System Analyzer provides visibility into the real-time behavior and performance of the BIOS MCSDK 2.0 Image Processing Demo. The System Analyzer and the MCSDK Demo page provides more information about how to use System Analyzer with the MCSDK.
Known Issues/Errata
DVT patch for CCS 5.1/5.1.1
- This patch fixes a number of critical issues (see below). It is recommended to install this patch if you're using System Analyzer on CCS 5.1/5.1.1 ... here are steps to install:
- From CCS main menu: select Help->Install New Software
- In Install dialog: select “Add…” to add the DVT (Data Analysis and Visualization Technology) update site
- In the Add Repositorydialog:
- Specify a Name: e.g DVT_for_CCS5.1
- Specify the DVT update site: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/DVT_for_CCS5.1
- Select OK
- In Install dialog select DVT. Then select Next to install
System Analyzer intermittently not receiving data in CCS 5.1/5.1.1
- There is a known problem where System Analzyer may not show any data only restarting CCS data may show up. The above DVT patch fixes this issue.
System Analyzer does not handle European locale (i.e. "," is used instead of "." for floating point)
- There is a known problem where System Analyzer report an exception because it encountered a "," instead of ".". The above DVT patch fixes this issue.
System Analyzer is not able to autoconfigure from the debug session
- There is a known problem where System Analyzer may not autoconfigure itself even though an instrumented application is loaded on the target. This is because unicode is not properly handled. The above DVT patch fixes this issue.
- There are two known problem which can cause System Analyzer not to show up in tools menu (along with CCS Graph, RTA, ROV, Image Analyzer, ...)
- The System Analyzer item in tool menu will diappear if MCSDK is insalled into CCS 5.1/5.1.1/5.2 with MCSA 1.0 selected in the MCSDK installer. MCSA is already present in CCS 5.1/5.1.1/5.2 and should not be selected in the MCSDK installer. If you encounter this problem then you can install the DVT patch mentioned above to recover
- There is a workspace compatibility between CCS4.2 and CCS5.x which can cause the System Analyzer tools menu item to disappear. This can be resolved by install the CCS5.1/5.1.1 DVT patch mentioned above or by using a new workspace.
System Analyzer does not recover after reloading/reset/restart target
- This is a known limitation. Recovery on target state change and on debug session restart will be added in CCS5.2. For now you'll have to Disconnect/Reconnect or Restart System Analyzer for it to recover.
CCS Crash when opening Graph in System Analyzer
- It appears that some graphics card drivers are not compatible with Eclipse support for text rotation. This may result in a CCS crash (inside the graphics driver) when opening graphs in System Analyzer (graphs use text rotation for y-axis label). If you encounter this problem, try updating the graphics card driver. This has resolved the occurrences of this problem we've seen so far.
Multicore correlation no working
- is not automatically supported for JTAG transports (it is supported for Ethernet). User can explicitly add synchronization logs to enable correlation.
- if the target is halted (either by explict halt or implicit halts such as CI/O) while data is being collected via ethernet then correlation will not work.
- if some target is generating data very infrequently then correlation may timeout resulting in uncorrelated data. In this case the data can be saved to a binary file and post process for correlation to work.
uia_1_00_04_35 : Tutorial 1 and Tutorial 2 do not build properly.
- The build fails with the error "dc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't locate the package 'ti.sysbios.knl'"
- To overcome this, please unzip http://processors.wiki.ti.com/index.php/File:UIAMetaData.zip into <uia_1_00_04_35 install folder>/packages/ti/uia/runtime/ to update the UIAMetaData.xs file. Then delete the <Debug> folder from your project and rebuild.
FAQs
Q: When can I use System Analyzer auto configuration
When launching a Live or Binary File session users can choose to let System Analyzer auto configure itself. For this to work you must:
- have a debug session running with the symbol/program file loaded
- generated rta and uia xml file (program.rta.xml and program.uia.xml) files should be located where the project generated them or in the same folder as the .out file
- if using Ethernet transport it is expected that IP address is output in the console
Q: Configuring System Analyzer when auto configuration is not possible
See Configuring System Analyzer Transport and Endpoints in Chapter 4 of the System Analyzer User's Guide
Q: Can I launch System Analyzer before the target if running
If using Ethernet transport, System Analyzer expects that the target is up and running and the Ethernet connection is established before it is started. For JTAG transport the target does not have to be running.
Q: What happens if the target is halted while collecting data using Ethernet transport
Halting the target may result in the ethenet connection getting disconnected. The connection can be re-established using the connect button.
Q: How to Profile functions using enter and exit hook functions
In order to do inclusive and exclusive profiling of functions(using Context Aware Profiler of System Analyzer), a UIA log is needed at the entry and exit point of functions. One can add entry and exit hook functions to every function in the source by doing the following
Use the following compiler options when compiling the source
--entry_hook=functionEntryHook --entry_parm=address --exit_hook=functionExitHook --exit_parm=address
To use the required UIA events, need this include
#include <ti/uia/events/UIABenchmark.h>
Add entry and exit hook functions to the source (The below one is for Context aware function profiling)
void functionEntryHook( void (*addr)() ){
Log_write3(UIABenchmark_startInstanceWithAdrs, (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)0, (IArg)addr);
}
void functionExitHook( void (*addr)() ){
Log_write3(UIABenchmark_stopInstanceWithAdrs, (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)0, (IArg)addr);
}
The 1st parameter after the message string is a context parameter and can be used to specify an additional level of qualification. For our purpose out here we can ignore this and just set it to 0.
If task aware profiling is needed, the Task context has to be logged. SYS/BIOS automatically logs events for task switches and SWI and HWI Start and Stop events. See Enabling and Disabling logging Sec 5.2.2 in System Analyzer User's Guide. Context change can also be explicitly logged by the application. For more on Profiling using system analyzer refer to section 3.5,4.12 of the user's guide.
Profiling Results when using Libraries: Hook functions will not be added and hence called from functions in libraries that have been linked in. This will cause the Exclusive counts of the functions making calls to the Library, to include the Library functions duration.
Trouble Shooting
System Analyzer Events or Packets are being dropped
See Troubleshooting System Analyzer Connections section in the System Analyzer User's Guide
No Events showing up in System Analyzer Views
See Troubleshooting System Analyzer Connections section in the System Analyzer User's Guide
System Analyzer cannot connect to the target to retrieve logs
See Troubleshooting System Analyzer Connections section in the System Analyzer User's Guide
System Analyzer Events do not make sense
See Troubleshooting System Analyzer Connections section in the System Analyzer User's Guide
Time values in the logs are too large
See Troubleshooting System Analyzer Connections section in the System Analyzer User's Guide
Technical Support and Product Updates
For technical discussions and issues, please visit
- C66x Multicore forum: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639.aspx
- BIOS Embedded Software forum: http://e2e.ti.com/support/embedded/f/355.aspx
- Embedded Processors wiki: http://processors.wiki.ti.com
Note: When asking for help in the forum you should tag your posts in the Subject with "System Analyzer", the part number (e.g. "C6678"), and component (e.g. "UIA").
For product updates,
- Use the CCS/Eclipse Update Manager (see the Getting Started Guide above)
