NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
System Analyzer Tutorial 3C
System Analyzer Tutorial 3C: Real-time visibility for RTOSes[edit]
How to use the System Analyzer Execution Graph and Task Load Graph[edit]
So far in this tutorial we've been looking at SysBios events using the Log view, which displays the events as text in a list format. A far more effective way of looking at SysBios events is to look at the events as a graph, with the x-axis showing the time the event was logged at. The following graphs provide visibility into SysBios events:
- Execution Graph: Shows thread activity on each CPU that is being monitored
- Task Load: Shows the CPU load data measured within a SYS/BIOS Task thread.
- CPU Load: Shows the SYS/BIOS load data collected for all cores in the system.
To make it easier to see these graphs in action, some "pre-recorded" UIA event data has been captured from Tutorial 3B running on a TMS320C6472 EVM. To use this data, please download Tutorial3_PreRecordedData.zip and unzip into e.g. C:\. This will create a folder named "\SystemAnalyzerTutorial3" that contains the binary event data, the associated .out files and metadata files, as well as a UIA configuration file.
- Note: if you unzip the files to a location other than C:\, you will need to modify the file names in the included UIA Configuration file (Tutorial3.usmxml) to point to the correct location of the Tutorial3.out, Tutorial3.uia.xml and Tutorial3.rta.xml files.
To view this data using System Analyzer:
1. Close any active System Analyzer sessions
- e.g. click on the red X in the Logs view, or select Tools / System Analyzer / <session name> / Remove
- e.g. click on the red X in the Logs view, or select Tools / System Analyzer / <session name> / Remove
2. Open the binary file in the "\SystemAnalyzerTutorial3" folder
- Tools / System Analyzer / Open Binary File
- Click on the
button to the right of the File Name box and open the "\SystemAnalyzerTutorial3\Tutorial3_systemAnalyzerData.bin" file.
- Click on the
button to the right of the "Instrumentation (UIA) Config:" box and open the "\SystemAnalyzerTutorial3\Tutorial3.usmxml" file.
- Check the CPU Load, Task Load and Execution Graph checkboxes
- Click the Run button.
This will cause 4 views to be opened: (Logs view, Execution Graph, CPU Load Graph, Task Load Graph).
Notice that when a graph is first opened, it is scrolled to the far right by default, and is zoomed in to a fairly small subset of the most recently recorded data. To see the full data set, you will need to zoom out.
Zooming in and out: X-axis magnification[edit]
There are 3 ways to control which region of the x-axis in a graph that you wish to display:
1. Clicking and dragging a point below the x-axis
- The view must be in focus and the cursor must be located below the x-axis and above the bottom edge of the graph.
- While the mouse button is pressed, a dashed rectangle is be displayed showing you the 'zoom in' region you are selecting. When you release the mouse button, the display will zoom in to show the selected region.
2. The Zoom In and Zoom Out
buttons
3. The mouse scroll wheel
- The view must be in focus and the cursor must be located below the x-axis and above the bottom edge of the graph.
- moving the mouse wheel towards you zooms out
- moving the mouse wheel away from you zooms in
Some things to note:
- The zoom action is always relative to the center of the display.
- Each "Zoom out" action expands the timespan displayed by the amount configured by the Zoom Options dropdown list (default is 2x).
- Each "Zoom in" action reduces the timespan displayed by the amount configured by the Zoom Options dropdown list.
- Clicking on the graph above the x-axis and then zooming in or out will cause the graph to be automatically re-centered at the x-axis position that you clicked on
- this can cause you to lose track of where you are trying to zoom into if you are not aware of it!
- Tip: to make it easier to keep track of a point on the x-axis, add a measurement marker or bookmark at that point and then click on the marker to 'set' the zoom focal point. Then zoom in or out.
Grouping views[edit]
To see which event in the Logs view corresponds to a point in time on one of the Graphs, you can "Group" the views together by clicking on the button in the toolbar of each view that you are interested in. Then, when you click on an item in any of the views in the group (e.g. the Logs view), the cursor position in all of the other views in the group will automatically be updated to show the same point in time. Also, when you scroll the view, the other views in the group will also scroll by the same amount.
To see this in action, please arrange the System Analyzer views so that they are all visible at the same time.
- To change which viewing pane a view is shown in, click on the view's tab and drag it to the new position you would like it to be displayed at.
- To create a new viewing pane to the right of an existing viewing pane, drag the view's tab to the far right edge of the Eclipse application until a grey outline box is displayed, and release the mouse button.
Different Ways to view Task Names and Task Activity[edit]
By default, when the Execution Graph opens up, a single multi-colored horizontal bar is displayed per CPU, allowing users to see activity on multiple CPUs simultaneously. Each different task on the CPU is assigned a unique color, with a small vertical black line showing the task switch location. Hovering over the horizontal bar will cause a tooltip to be displayed that shows the name of the task that is active at the point in the graph that the mouse is located at. If you only see a small vertical black line with the same color on both the left and right sides, zoom in on that region of the graph to see what (briefly executing) task was executing at that point in time.
To show the task names on the Y-Axis, click on the button in the Execution Graph's toolbar. Then click on the "OS" node under the CPU name to expand or collapse the task names for that CPU. You can hover above a partially visible task name in the y-axis or above a colored bar in the graph itself to have the full task name shown as a tooltip. (After CCSv5.1, you should be able to drag the y-axis horizontally to expose the full task name).
Viewing event data as it is being captured[edit]
So far in Tutorial 3C, we've been viewing events from a pre-recorded binary file. If your application is configured either with an Ethernet transport or a Run-mode JTAG transport, you can also view events as they are being captured and uploaded from the target. In this 'live' mode, trying to focus on one particular event that has been captured can be difficult, since the Logs view and the various graphs are continuously being updated. The following features have been provided to help make working with event data as it is being captured a bit easier:
1. Automatic Scroll Lock
Data views scroll to the very end when new data is received. If you want to look at a point of interest in the view while data is updating, clicking on the graph or table will stop the view from automatically scrolling to the end and will cause it to stay at the position that was clicked.
- Another way to turn off automatic scrolling is to click on the
button in the toolbar.
- Once automatic scrolling has been disabled, the button in the toolbar will appear as if it has been pressed:
- Data will continue to get appended to the end.
- Clicking on the scroll lock button again will cause the view to resume scrolling to the end whenever it receives new data.
Please note, if grouping on data views is enabled (i.e. is on), data views will scroll synchronously together. The scroll lock works independently of the group and will not lock the scrolling of grouped views.
2. Freeze the view
- Use the
on the toolbar to freeze the view's data updates and disable the view's automatic refresh completely.
- Clicking on the Freeze button again will unfreeze the view's data updates and re-enable the automatic refresh.
3. Pause Data Decoding
If you find that so many events are being captured that your PC is becoming slow to respond, you can reduce the CPU burden on your PC by pausing the event decoding.
- Events will continue to be captured to the binary file that was specified in the System Analyzer Live Parameters dialog when you started the session.
- To view the events that were received while the decoding was disabled, you will need to remove the session and open the binary file that was recorded.
- Clicking on this button will cause the decoding of events to resume from the point where it was paused.
4. Pause Transfer
If you are using Ethernet as a transport, commands are sent to the target to start and stop event transfer. When you first start System Analyzer, it will automatically connect to the target at the IP address that was configured by the Live Parameters dialog and will send a start command to the target.
- The System Analyzer session will remain open as will the Ethernet communications path with the target.
- Clicking on this button will send a start command to the target via Ethernet, and events will then resume being uploaded.
5. Disconnect
- The
button in the Logs view toolbar disconnects System Analyzer from the target, leaving the captured event data in the views.
- Once disconnected, the button changes to
.
- Clicking on this button re-connects System Analyzer with the target without having to go through the creation of a new System Analyzer session.
- All data in the views is cleared.
6. Remove Session
- The
button in the Logs view toolbar removes the System Analyzer session, automatically closing all of the associated views.
- Once a session has been removed, you will need to go through the Tools / System Analyzer / Live dialog in order to set up a new session.
Next: Tutorial 4: Multicore Event Correlation - includes how to use IPC to allow System Analyzer to monitor and communicate with multi core devices
Links: