[go: up one dir, main page]

0% found this document useful (0 votes)
312 views41 pages

S32 Design Studio Tracing and Analysis User Guide

Uploaded by

Nguyen Quang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views41 pages

S32 Design Studio Tracing and Analysis User Guide

Uploaded by

Nguyen Quang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

S32 Design Studio Tracing

and Analysis User Guide


Contents

Chapter 1: Introduction...........................................................................................3
About this manual.................................................................................................................................................4
Accompanying documentation............................................................................................................................. 4

Chapter 2: Setting up trace collection....................................................................5


Process for collecting data................................................................................................................................... 6
Creating a new project......................................................................................................................................... 6
Configuring Debug Launcher...............................................................................................................................8

Chapter 3: Collecting trace data...........................................................................15


Overview............................................................................................................................................................. 16
Configuring and collecting trace using Trace Commander view...................................................................... 16

Chapter 4: View Trace Data................................................................................. 22


Analysis Results view.........................................................................................................................................23
Viewing Trace data.................................................................................................................................24
Viewing Timeline data........................................................................................................................... 26
Viewing Code Coverage data.................................................................................................................30
Viewing Performance data..................................................................................................................... 33
Viewing Call Tree data.......................................................................................................................... 36

List of Figures................................................................................................................................38

List of Tables................................................................................................................................. 40

Index................................................................................................................................................41

2 NXP Semiconductors
Introduction

Chapter

1
Introduction
Topics: This manual explains how to use the S32 Design Studio for Tracing and
Analysis.
• About this manual
This chapter presents an overview of the manual. The topics in this chapter
• Accompanying documentation
are: About this manual Each chapter of this manual describes a different area
of software development. Accompanying documentation The Documentation
page describes the documentation included in this version of S32 Design
Studio IDE.

NXP Semiconductors 3
Introduction

About this manual


Each chapter of this manual describes a different area of software development.
The following table lists the contents of this manual.

Table 1: Manual contents

Chapter Description
Introduction This chapter.
Setting up trace collection Explains how to use the S32 Design Studio for S32 series to collect trace data.
Collecting trace data Explains how to manage and view the trace data.
View Trace Data Explains how to view various types of data trace collected on an application.

Accompanying documentation
The Documentation page describes the documentation included in this version of S32 Design Studio IDE.
You can access the Documentation page by selecting Help > Help Contents from the IDE's menu bar.

4 NXP Semiconductors
Setting up trace collection

Chapter

2
Setting up trace collection
Topics: This chapter guides you on how to use the S32 Design Studio to setup trace
collection.
• Process for collecting data
It also explains the steps to create a new project, create a Debug
• Creating a new project
Configuration and setup the Software Analysis Configuration. This section
• Configuring Debug Launcher has following topics:

NXP Semiconductors 5
Setting up trace collection

Process for collecting data


This section describes the process for setting up the tools required for data collection.
To collect trace data, perform the following steps in sequence:
1. Create and configure a project
2. Set up the platform configuration to collect the analysis data from the hardware
3. Run the application on the target to collect trace data

Creating a new project


This section explains the process to create new projects for hardware profiling.
You can use the S32DS Application Project Wizard to create new projects for tracing. The S32DS IDE is a project-
oriented interface. You must create a new project or open an existing project before using the Analysis tools. To
create a new project, perform the following steps:
1. Select File > New > S32DS Application Project.
The S32DS Application Project page appears.

6 NXP Semiconductors
Setting up trace collection

Figure 1: Create an S32DS Application Project page


2. On the S32DS Application Project page, enter the name of your project and also specify the location of the
project.
3. Choose the family and the version of the board that you want to collect trace from, then click Next.
4. Now you will be prompted to select on which cores you want your application, and with which parameters. Here
you can also select the debugger you want to use.
To be able to use Trace functionality you must use S32 Debugger!

NXP Semiconductors 7
Setting up trace collection

Figure 2: Select Cores and parameters page


5. Click Finish.
In S32DS IDE, the project is created in the Project Explorer view.

Figure 3: Project Explorer view

Configuring Debug Launcher


You need to define the trace configuration before debugging the application for trace collection.
To define a trace configuration:
1. Right-click the selected project in the Project Explorer view and select Build Project from the context menu.

8 NXP Semiconductors
Setting up trace collection

2. In the Project Explorer view, right-click on the project and select Debug as > Debug Configurations from the
context menu.
The Debug Configurations dialog appears.

Figure 4: Debug Configurations Dialog Box - Main Page


3. Expand the S32 Debugger group in the tree structure on the left, and select the launch configuration
corresponding to the project you are using. For example, MyProject_A53_0_0.
4. Click on the Debugger tab. Here, make sure the Initial core checkbox is checked, and you can also select the
Debug Probe Connection Interface, either over Ethernet, and you must specify its IP, or over USB and the IDE
tries to find it automatically when you click on Refresh
Here is very important for the Launch server checkbox to be checked in order to be able to Debug!

NXP Semiconductors 9
Setting up trace collection

Figure 5: Debug Configurations Dialog box - Debugger Page


5. Click the Trace and Profile tab. This tab has the Overview and Basic pages.

10 NXP Semiconductors
Setting up trace collection

The Overview page displays the flow diagram for collecting trace.

Figure 6: Trace and Profile Page - Overview page


6. In the Basic page, you can see the configuration file used for the board. You can create a New one or use the one
generated by the IDE.

NXP Semiconductors 11
Setting up trace collection

Figure 7: Trace and Profile page - Basic tab


7. Click on Edit and the Trace Configurations window should appear.

Figure 8: Trace Configurations Window


8. Here you need to Add the .ELF file that was built for your project. Click on Add and then click on the row under
the New File column and a button with three dots should appear. Click on the button and then browse to the
location of the .ELF file. You need to add each ELF file from each project for the cores that you want to collect
trace from.
9. To change the server port, go to the Target Access section and modify the default value to the desired one.

12 NXP Semiconductors
Setting up trace collection

Figure 9: Trace Configurations Target Access


10. Import button is used to load an existing configuration file from your file system. To save the configuration file
for future use or sharing, use the Export button.

NXP Semiconductors 13
Setting up trace collection

Figure 10: Trace Configurations Export


11. Click Apply to save the configuration.
To start the trace collection, in the Debug window, click Debug to start debugging the project.

14 NXP Semiconductors
Collecting trace data

Chapter

3
Collecting trace data
Topics: This section explains how to collect trace using the Trace Commander feature
of S32 Design Studio.
• Overview
This section has following topics:
• Configuring and collecting trace
using Trace Commander view

NXP Semiconductors 15
Collecting trace data

Overview
Trace Commander feature uploads the trace and configures the modules included in the target architecture in a more
user-friendly graphical interface.
For S32V234, the Trace IP looks like this:

Figure 11: S32V234 Trace IP

The 4 A53-cores of the S32V234 are split in 2 clusters, each with 2 cores. Core 0 and Core 1, from Cluster 0, output
trace in ETF 0 and Core 2 and Core 3, from Cluster 1, store trace in ETF 1. You can only collect from one ETF at a
time.
Note: For some platforms, trace is not supported for all cores.

Configuring and collecting trace using Trace Commander view


Trace Commander view is used to manage the trace collection data. The view is used to perform actions such as, start,
stop trace on different trace generators, manual upload or trace configuration for data trace collection.
Trace Commander is based on an xml platform configuration file, which is responsible for configuring all the
modules included in the target architecture. Hence, the Trace Commander tool is used to ease the task of configuring
and uploading trace.
Trace Commander displays all the modules from a platform configuration file. Perform the following steps in order to
collect multi core trace data using Trace Commander:
1. Select Window > Show View > Other > Software Analysis > Trace Commander.
The Trace Commander view is displayed.
2. Choose the Platform configuration file, for example select Test_Configuration.xml.

16 NXP Semiconductors
Collecting trace data

Figure 12: Platform configuration file.

The Trace Commander view displays all trace generators and trace buffers available in the selected platform file.
The colors suggest if they are available or not for collecting trace. Green means the trace generator is enabled and
grey means that the trace generator is disabled.
3. Double click on one of the Trace Generators or Trace Buffers to configure it. You can also use Config button
and from the new Trace Configuration window click on Advanced Trace Generators configuration.

NXP Semiconductors 17
Collecting trace data

Figure 13: Trace Configuration window

18 NXP Semiconductors
Collecting trace data

Figure 14: Advanced trace configuration window


4. Enable one of the trace buffers from Data Streams to collect trace, for example select ETF 0. Multiple ETFs can
be enabled but you can collect trace from only one buffer at a time.
5. Depending on the board configuration and initialization script used, some trace modules may not be accessible.
In the case you are not completely initializing the board, make sure to uncheck the "Reset trace modules before
configuration" checkbox, and only enable the trace modules you are using.

NXP Semiconductors 19
Collecting trace data

Figure 15: Reset trace modules before configuration


6. Once you are done with configuring click this button to Connect.

When the session is started the button looks like this , meaning the target is configured using the selected
platform file. This will be attached to the active debug session. The configuration is applied on the whole
platform. Now the trace buffer and trace generators selection and configuration becomes unavailable.

If you click again on the button the session will stop and the button will change to this again , the trace
stream gets interrupted and the file gets inactive. Hence, the trace buffer and trace generators configuration
becomes available.
7. You can click the Trace Generators Group Name, for example CORE, to Start or Stop all the modules from
that group. The Trace Commander view will update each trace generator state.
8. Once your program ran enough you can click the Upload button, available on the trace buffer, to save the data
trace collected. Data trace can be saved only on connection with the active debug session.
Note: It is recommended to suspend the generator core or the target while collecting core trace, e.g. when a
breakpoint is hit.

Figure 16: Selected trace buffer and upload button


Trace data is saved in .AnalysisData folder from the application’s workspace.
The toolbar options from the Trace Commander view allows you to perform:

Refresh : refreshes the view .

Settings : opens the Platform Configuration Settings window. This lists all available platform
configuration files from <workspace dir>/.metadata/.plugins/com.freescale.sa/
platformConfig. You can add, remove, or duplicate a platform configuration file.

20 NXP Semiconductors
Collecting trace data

Figure 17: Platform Configuration window



Export : exports the current displayed configuration file.

NXP Semiconductors 21
View Trace Data

Chapter

4
View Trace Data
Topics: This topic describes how to display the collected trace data and how to view
the decoded trace data.
• Analysis Results view
This chapter includes:

22 NXP Semiconductors
View Trace Data

Analysis Results view


The Analysis Results view shows and manages collected traces.
The main features of the Analysis Results view are: organizing logic of trace and profiling results, enable/disable
links towards profiling viewers, save/rename/delete results, expand all/collapse all results, and refreshing the view.
From the menu bar, select Window > Show View > Other > Software Analysis > Analysis Results to view
Analysis Results view.
Note: You can also press Alt+Shift+Q, Q to open the Other Views dialog box and select Software Analysis -->
Analysis Results view.
The Analysis Results view pops up and gets focus after successfully collecting a trace. It does not refresh
automatically. Click the Refresh button in the Analysis Results view to update the links to view the profiling trace
data. The following figure shows the Analysis Results view.

Figure 18: Analysis Results view

The data in results table is organized (from top to bottom) in the following manner:
• Platform Configuration: Name of the platform configuration file used to collect the trace result.
• Data streams: The data source from where the trace was collected. For example, it can be ETF 0 or ETF 1.
• Result sets: Lists the collected trace data.
The Analysis Results view allows to perform the following actions:

Table 2: Analysis Results Toolbar

Button Description
Refresh Refreshes the view and rescans all output folders for
trace and analysis results
Expand all Expands all nodes in the tree
Collapse all Collapses all nodes in the tree
Select custom results folder Allows to select a custom folder to scan for trace results

Apart from the above described toolbar actions, the context menu also allows to perform the following actions for a
selected trace result:
• Rename: To rename the selected trace result
• Save: To save the selected trace result. The save function creates a copy of the selected trace results with an
index appended to the name. By default when a new trace is collected it receives the name of the project from
where it was collected. If there is already a trace with that name, it is overwritten.

NXP Semiconductors 23
View Trace Data

• Delete: To delete the selected trace result.


The Analysis Results view can also show the results from more folders. Each platform configuration available in
.metadata/.plugins/com.freescale.sa/platformConfig/ folder is checked for the path specified
towards the set of results. All sets of trace and profiling results found in those paths will appear in the Analysis
Results view. All the trace results available in workspace/.AnalysisData are displayed in Analysis Results
view.
To configure the view to display trace data of another custom results folder that does not belong to any platform
configuration inside the workspace:
1. Click Select custom results folder option available on the Analysis Results view toolbar.
The Custom results folder dialog gets displayed.
2. Click Add.
The SA Results Folder Selection dialog opens.
3. Browse the location of the required custom folder.
4. Click Ok.
The path to the custom folder for which the trace needs to be collected gets added under the Path field.
To configure the results folder for a platform configuration, specify the Results folder location available in the Trace
Configurations dialog box as shown in the below figure. The collected trace using the Platform configuration will be
saved in the specified folder.

Figure 19: Trace configuration dialog box

To view the collected trace data, click on the links of profiling results from the Analysis Results View:

Viewing Trace data


Click the Trace link from the Analysis Results view to display the trace data in the Trace viewer.
The following figure shows the fully decoded trace data.

24 NXP Semiconductors
View Trace Data

Figure 20: Trace Viewer

The below table explains various fields of the trace data:

Table 3: Trace data fields description

Field Description
Index Displays the order number of the instructions.
Source Displays source of trace event.
Type Displays type of trace event.
Description Displays description of trace event.
Address Displays the starting address of the target function.
Destination Displays the end address of the target function.
Timestamp Displays the value of platform global timestamp generator (64-bit wide). Time
stamping is useful for correlating multiple trace sources.

NXP Semiconductors 25
View Trace Data

Note: To see the options for the Trace Viewer, right click on a column. When the view
has more than 100000 lines, the options "Collapse All" and "Expand All" are not shown.

The following table lists the Trace viewer events and their description:

Table 4: Trace viewer events description

Trace events Description


Branch It reports a branch instruction from a source function to a destination function.
Linear It reports a linear instruction.
Software Context It reports the Software Context (Thread ID) from which the instruction is produced.
Interrupt It is used for interrupt contexts. It can be useful while constructing an accurate call stack.
Return It reports a return instruction from a source to a destination function.
Data It reports data address, data value, data size information or read/write transaction type.
Info It reports the Trace Source’s run status. The semantic of the information code is specific to the
Trace Source, so it can only be interpreted by a specialized trace consumer.
Error It reports an error instruction.
Custom It provides the following information:
• Label - A data label that indicates the “channel” with which the data value is
associated.
• Data - The custom data value.

Viewing Timeline data


Click on the Timeline link from Analysis Results view to view timeline data.
The following figure shows the trace data displayed in Timeline viewer.

26 NXP Semiconductors
View Trace Data

Figure 21: Timeline Viewer

Timeline viewer has a tabbed interface. A tab for each source (usually a core) is created automatically. Each tab has
its independent timeline plot with its own setup of groups and time unit. The timeline viewer can be controlled using
the toolbar. The timeline data displays the functions that are executed in the application and the number of cycles
each function takes when the application is run. The Timeline viewer shows a timeline graph in which the functions
appear on y-axis and the number of cycles appear on x-axis. The green-colored bars show the time and cycles taken
by the function.
The Timeline viewer has the following buttons:
• Selection Mode: Allows you to mark points in the function bars to measure the difference of cycles between
those points. To mark a point in the bar:
1. Click Selection Mode.
2. Click on the bar where you want to mark the point.
3. A yellow vertical line appears displaying the number of cycles at that point.
4. Right-click on another point in the bar.
5. A red vertical line appears displaying the number of cycles at that point along with the difference of cycles
between two marked points.
• Zoom Mode: Allows you to zoom-in and zoom-out in the timeline graph. Zooming can be performed using
the mouse wheel (even if this mode is not selected).
• Full View: Resets to the default zoom that allows seeing the full timeline
• Edit Groups: Allows you to customize the timeline according to the requirements. You can change the
default color of the line bars representing the functions to differentiate. You can add/remove a function to/
from the timeline. To perform these functions, select Edit Groups. The Edit Groups dialog box appears.

NXP Semiconductors 27
View Trace Data

Figure 22: Edit Groups dialog box

You can perform the following operations in the Edit Groups dialog box:

Add or remove function range


This section explains how to add or remove a function range from the Edit Groups dialog box.
Right-click on the function name in the Name column, and select Insert Range or press Ctrl+F to add a range. Select
Delete Selected from the context menu to delete the function from the graph. You can disable a function from the
graph by clearing the corresponding checkbox in the Name column. Check it again to include it in the graph.

Edit address range of function


This section explains how to edit the address range of a function from the Edit Groups dialog box.
Perform the following steps:
1. Select the function of which you want to change the address range.
2. Double-click on the cell of the Addresses column of the selected function.
The cell becomes editable.
3. Type an address range for the group or function in the cell.
Note: You can specify multiple address ranges to a function. The multiple address ranges are separated by a
comma.

Change color
This section explains how to change the color of a function in the timeline graph.
The color appears as a horizontal bar in the graph. Click on the Color column of the corresponding function, and
select the color of your choice from the Color window that appears.

28 NXP Semiconductors
View Trace Data

Add or remove group


This section explains how to add or remove a group from Edit Groups dialog box.
A group is a range of addresses. In case, you want to view trace of a part of a function only, for example, for loop,
you can find the addresses of the loop and create a group for those addresses. Perform the following steps to add a
group:
1. Right-click on the row, in the Edit Groups dialog box, where you want to insert a group, and select Insert Group
from the context menu. Alternatively, press the Ctrl+G key.
A row is added to the table with new as function name.

Figure 23: Adding Group Dialog Box


2. Double-click on the new group cell.
The cell becomes editable.
3. Type a name for the group, for example, MyGroup.
4. Double-click on the cell of the corresponding Addresses column, and edit the address range according to
requirements, for example, 0x3e902af0-0x3e902b07.
5. Change the color of the group.

Figure 24: After Editing Address Range and Color of Group Screen

To delete a group, select it, right-click on the Edit Groups dialog box, and select the Delete Selected option from
the context menu. You can also remove a group from the graph by clearing the corresponding checkbox in the
Name column. Check it again to include it in the graph.

NXP Semiconductors 29
View Trace Data

Merge groups or functions


This section explains how to merge the groups or functions available.
Merging is useful in case there are many functions and you do not want to view the trace of each and every function.
You cannot undo this operation, that is you cannot separate the merged functions or groups. To view the original trace
data, reopen the Trace Data viewer. Perform the following steps to merge the group or function:
1. In the Edit Groups dialog box, select the function or group to be merged.
2. Drag and drop it in the function or group with which you want it to get merged with.
3. Both the functions or groups merge into a single function or group that covers both address ranges, where the
function, getLimit is merged with the group, MyGroup.

Figure 25: Merging Functions or Groups Screen


4. Click OK.

Viewing Code Coverage data


Click the Code Coverage link to view to view the code coverage data.
The following diagram shows an example of the Code Coverage data.

30 NXP Semiconductors
View Trace Data

Figure 26: Code Coverage viewer

The Code Coverage data displays the summarized data of a function in a tabular form. The columns are movable;
you can drag and drop the columns to move them according to your requirements. It displays data into two views;
the top view displays the summary of the functions, and the bottom view displays the statistics for all the instructions
executed in a particular function. Click on a hyperlinked function in the top view of the Code Coverage viewer to
view the corresponding statistics for the instructions executed in that function.
The below table explains the various fields of the Summary table.

Table 5: Code Coverage Summary Table fields description table

Field Description
File/Function Displays the name of the function that has executed.
Address Displays the start address of the function.
Covered ASM % Displays the percentage of number of assembly
instructions executed from the total number of assembly
instructions per function or per source file
Not Covered ASM % Displays the percentage of number of assembly
instructions not executed from the total number of
assembly instructions per function or per source file.
Total ASM instructions Displays the total number of assembly instructions per
function and per source file.
ASM Decision Coverage % Displays the decision coverage computed for direct and
indirect conditional branches. It is the mean value of the

NXP Semiconductors 31
View Trace Data

Field Description
individual decision coverages. So if a function has two
conditional instructions, one with 100% and another with
50% decision coverage, the decision coverage would be
(100 + 50) / 2 = 75%. It is calculated only for assembly
instructions and not for C source code.
Time (Microsecond) Displays the total number of clock cycles that the
function takes
Size Displays the number of bytes required by each function.

The below table describes the fields of the statistics of the code coverage data.

Table 6: Code Coverage Details Table fields description table

Field Description
Line/Address Displays either the line number for each instruction in
the source code or the address for the assembly code.
Instruction Displays all the instructions executed in the selected
function.
Coverage % For C source lines, displays the percentage of number of
assembly instructions executed from the total number of
assembly instructions corresponding to the source line.
For assembly source lines, it shows if the instructions
were executed or not.
ASM Decision Coverage Displays the decision coverage computed for direct and
indirect conditional branches. It is the mean value of the
individual decision coverages. So if a function has two
conditional instructions, one with 100% and another with
50% decision coverage, the decision coverage would be
(100 + 50) / 2 = 75%. It is calculated only for assembly
instructions and not for C source code.
ASM Count Displays the number of times each instruction is
executed.
Time (CPU Cycles) Displays the total time taken by each instruction in the
function.

Note: In the Code Coverage viewer, all functions in all files associated with the project are displayed irrespective of
coverage percentage. However, the 0% coverage functions do not appear in the Performance and Call Tree viewers
because these functions are not considered to be computed and are not a part of caller-called pair.
When you double-click in Details table on an instruction, it opens (if available) the source file and highlights the
instruction line. If the source is not available, you can Locate the file.
Click on the column header to sort the code coverage data by that column. However, you can only sort the code
coverage data available on the top view. The icons available in the summary view of the Code Coverage tab allow
you to perform the following actions:
• Previous function- Lets you view the details of the previous function that was selected in the Summary table
before the currently selected function. Click it to view the details of the previous function.
• Next function- Lets you view the details of the next function that was selected in the Summary table.

32 NXP Semiconductors
View Trace Data

Note: The Previous and Next buttons are contextual and go to previous/next function according to the history
of selections. So if you select a single line in the view, these buttons will be disabled because there is no
history.
• Export - Lets you export the code coverage data in a CSV or html format. Click the button to choose between
Export to CSV or Export to HTML options. The Export to CSV option lets you export data of both
Summary and Details tables. The exported html file contains the statistics for all the source files/functions
from the Summary table along with the statistics of source, assembly or mixed instructions.
• Configure Table - Lets you show and hide column(s) of the code coverage data. Click and select the
Configure Columns for Summary Table option to show/hide columns in the Summary table (top view) or
the Configure Columns for Details table option to show/hide columns of the Details table (bottom view).
The Drag and drop to order columns dialog appears in which you can check/uncheck the checkboxes
corresponding to the available columns to show/hide them in the Code Coverage viewer. The option also
allows you to set CPU frequency and set time in cycles, milliseconds, microseconds, and nanoseconds.
• Collapse/Expand all files - Lets you expand or collapse all files in the Summary table.
• Filter Files - Allows you to choose the list of files to be displayed in the Summary table.
• Switch to executable source lines statistics/Switch to ASM instructions statistics - Lets you switch
between source lines or ASM instructions to be displayed in the Summary table.
You can perform the following actions on the Details table:
• Search - Lets you search for a particular text in the Details table. In the Search text box, type the data that you
want to search and click the Search button.
• Graphics - Lets you display the histograms in two colors for the ASM Count and Time columns in the
bottom view of the code coverage data. Click the button and select the Assembly/Source > ASM Count or
Assembly/Source > Time option to display histograms in the ASM Count or Time column. The colors in
these columns differentiate source code with the assembly code.
• Show code - Lets you display the assembly, source or mixed code in the statistics of the Code Coverage data.

Viewing Performance data


Click on the Performance link available in Analysis Results View to display performance data.
The Performance viewer appears as shown below.

Figure 27: Performance Viewer

The Performance viewer is divided into two views:


• The top view presents function performance data in the Summary table. It displays the count and invocation
information for each function that executes during the measurement, enabling you to compare the relative data

NXP Semiconductors 33
View Trace Data

for various portions of your target program. The information in the Summary table can be sorted by column in
ascending or descending order. Click the column header to sort the corresponding data.
The following table explains the fields of the Summary table.

Table 7: Field description of Summary table

Field Description
Function Name Name of the function that has executed.
Num Calls Number of times the function has executed.
Inclusive Cumulative metric count during execution time spent
from function entry to exit.
Min Inclusive Minimum metric count during execution time spent
from function entry to exit.
Max Inclusive Maximum metric count during execution time spent
from function entry to exit.
Avg Inclusive Average metric count during execution time spent
from function entry to exit.
Percent Inclusive Percentage of total metric count spent from function
entry to exit.
Exclusive Cumulative metric count during execution time spent
within function.
Min Exclusive Minimum metric count during execution time spent
within function.
Max Exclusive Maximum metric count during execution time spent
within function.
Avg Exclusive Average metric count during execution time spent
within function.
Percent Exclusive Percentage of total metric count spent within
function.
Percent Total Calls Percentage of the calls to the function compared to
the total calls.
Code Size Number of bytes required by each function.
• The bottom view or the Details table presents call pair data for the function selected in the Summary table. It
displays call pair relationships for the selected function that shows which function called the another function.
Each function pair consists of a caller and a callee. The percent caller and percent callee data is also displayed
graphically. The functions are represented in different colors in the pie chart, you can move the mouse cursor
over the color to see the corresponding function.
When you double-click in Details pane on a call site, it opens (if available) the source file and highlights the
call-site line. If the source is not available, you can Locate the file.
The below table describes the fields of the Details table. You cannot sort the columns of this table.

Table 8: Field description of Details table

Field Description
Caller Name of the calling function.

34 NXP Semiconductors
View Trace Data

Field Description
Callee Name of the function that is called by the calling
function.
Num Calls Number of times the caller called the callee.
Inclusive Cumulative metric count during execution time spent
from function entry to exit.
Min Inclusive Minimum metric count during execution time spent
from function entry to exit.
Max Inclusive Maximum metric count during execution time spent
from function entry to exit.
Avg Inclusive Average metric count during execution time spent
from function entry to exit.
Percent Callee Percent of total metric count during the time the
selected function is the caller of a specific callee. The
data is also shown in the Caller pie chart.
Percent Caller Percent of total metric count during the time the
selected function is the callee of a specific caller. The
data is also shown in the Callee pie chart.
Call Site Address from where the function was called.

The table below lists the buttons available in the Summary table of the Performance viewer.

Table 9: Buttons Available in Summary Table of Performance Viewer

Name Button Description


Previous Function Allows you to view the details of the previous function that was
selected in the bottom view before the currently selected function.
Click it to view the details of the previous function.
Next Function Allows you to view the details of the next function that was
selected in the bottom view. NOTE: The Previous and Next
buttons are contextual and go to previous/next function according
to the history of selections. So if you select a single line in the
view, these buttons will be disabled because there is no history.
Export Allows you to export the performance data of both top and bottom
views in a CSV file. Click the button and select the Export the
statistics above option to export the details of the top view or the
Export the statistics below option to export the details of the
bottom view respectively.
Configure Table Allows you to show and hide column(s) of the performance
data. Click the button and select the Configure Columns for
Summary Table option to show/hide columns of the top view
or the Configure Columns for Details Table option to show/
hide columns of the bottom view. The Drag and drop to order
columns dialog box appears in which you can check/clear the
checkboxes corresponding to the available columns to show/hide
them in the Performance viewer.

NXP Semiconductors 35
View Trace Data

Viewing Call Tree data


Click the Call Tree link to view the call tree data.
The following image shows an example of the Call Tree data.

Figure 28: Call Tree Viewer

In the Call Tree viewer, START is the root of the tree. You can click on the arrow next to it to expand or to collapse
the tree. It shows the biggest depth for stack utilization in Call Tree and the functions on this call path are displayed
in green color. The Call Tree nodes are synchronized with the source code. You can double-click on the node to view
the source code. The columns can be resized by moving the columns to the left or right of another column depending
on your requirements by dragging and dropping.
The following table describe the fields of Call Tree data.

Table 10: Call Tree fields description table

Field Description
Function Name Name of function that has executed.
Num Calls Number of times function has executed.
% Total calls of Parent Percent of number of function calls from total number of
calls in the application.
% Total times it was called Percent of number of times a function was called.
Inclusive Time Cumulative count during execution time spent from
function entry to exit.

36 NXP Semiconductors
How to Reach Us: Information in this document is provided solely to enable system and software
Home Page: implementers to use NXP products. There are no express or implied copyright licenses
granted hereunder to design or fabricate any integrate circuits based on the information
nxp.com in this document. NXP reserves the right to make changes without further notice to any
Web Support: products herein.

nxp.com/support NXP makes no warranty, representation, or guarantee regarding the suitability of its
products for any particular purpose, nor does NXP assume any liability arising out of
the application or use of any product or circuit, and specifically disclaims any and all
liability, including without limitation consequential or incidental damages. “Typical”
parameters that may be provided in NXP data sheets and/or specifications can and do
vary in different applications, and actual performance may vary over time. All operating
parameters, including “typicals”, must be validated for each customer application by
customer's technical experts. NXP does not convey any license under its patent rights nor
the rights of others. NXP sells products pursuant to standard terms and conditions of sale,
which can be found at the following address: nxp.com/SalesTermsandConditions.
While NXP Semiconductors has implemented advanced security features, all products may
be subject to unidentified vulnerabilities. Customers are responsible for the design and
operation of their applications and products to reduce the effect of these vulnerabilities on
customer’s applications and products, and NXP Semiconductors accepts no liability for
any vulnerability that is discovered. Customers should implement appropriate design and
operating safeguards to minimize the risks associated with their applications and products.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD,
Airfast, Altivec, CodeWarrior, ColdFire, ColdFire+, CoolFlux, CoolFluxDSP, the CoolFlux
logo, EdgeLock, EdgeScale, EdgeVerse, eIQ, Embrace, Freescale, the Freescale logo,
GreenChip, the GreenChip logo, HITAG, ICODE, I - CODE, Immersiv3D, JCOP, Kinetis,
Layerscape, MagniV, Mantis, MIFARE, the MIFARE logo, MIFARE CLASSIC, MIFARE
DESFire, MIFARE FleX, MIFARE Plus, MIFARE Ultralight, MIFARE 4Mobile, the
MIFARE4Mobile logo, MiGLO, mobileGT, NTAG, the NTAG logo, PEG, Plus X,
PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, Qorivva, RoadLINK, the
RoadLINK logo, SafeAss ure, SmartM X, StarCore, Symphony, Tower, TriMedia,
UCODE, the UCODE DNA logo, VortiQa and Vybrid are trademarks of NXP B.V. All
other product or service names are the property of their respective owners. AMBA, Arm,
Arm7, Arm7TDMI, Arm9, Arm11, Artisan, big.LITTLE, Cordio, CoreLink, CoreSight,
Cortex, DesignStart, DynamIQ, Jazelle, Keil, Mali, Mbed, Mbed Enabled, NEON, POP,
RealView, SecurCore, Socrates, Thumb, TrustZone, ULINK, ULINK2, ULINK-ME,
ULINK-PLUS, ULINKpro, µVision, Versatile are trademarks or registered trademarks
of Arm Limited (or its subsidiaries) in the US and/or elsewhere. The related technology
may be protected by any or all of patents, copyrights, designs and trade secrets. All rights
reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. The
Power Architecture and Power.org word marks and the Power and Power.org logos and
related marks are trademarks and service marks licensed by Power.org.

© NXP 2024 All rights reserved.

For more information, please visit: http://www.nxp.com


For sales office addresses, please send an email to: salesaddresses@nxp.com

Revision: 1.0, March 2024

NXP Semiconductors 37
List of Figures
Figure 1: Create an S32DS Application Project page......................................................................7

Figure 2: Select Cores and parameters page.................................................................................... 8

Figure 3: Project Explorer view....................................................................................................... 8

Figure 4: Debug Configurations Dialog Box - Main Page.............................................................. 9

Figure 5: Debug Configurations Dialog box - Debugger Page...................................................... 10

Figure 6: Trace and Profile Page - Overview page........................................................................11

Figure 7: Trace and Profile page - Basic tab................................................................................. 12

Figure 8: Trace Configurations Window........................................................................................12

Figure 9: Trace Configurations Target Access...............................................................................13

Figure 10: Trace Configurations Export.........................................................................................14

Figure 11: S32V234 Trace IP.........................................................................................................16

Figure 12: Platform configuration file............................................................................................17

Figure 13: Trace Configuration window........................................................................................ 18

Figure 14: Advanced trace configuration window......................................................................... 19

Figure 15: Reset trace modules before configuration.................................................................... 20

Figure 16: Selected trace buffer and upload button....................................................................... 20

Figure 17: Platform Configuration window................................................................................... 21

Figure 18: Analysis Results view................................................................................................... 23

Figure 19: Trace configuration dialog box.....................................................................................24

Figure 20: Trace Viewer.................................................................................................................25

Figure 21: Timeline Viewer............................................................................................................27

Figure 22: Edit Groups dialog box.................................................................................................28

Figure 23: Adding Group Dialog Box........................................................................................... 29

Figure 24: After Editing Address Range and Color of Group Screen............................................29

Figure 25: Merging Functions or Groups Screen...........................................................................30

38 NXP
Semiconductors
Figure 26: Code Coverage viewer..................................................................................................31

Figure 27: Performance Viewer......................................................................................................33

Figure 28: Call Tree Viewer...........................................................................................................36

NXP Semiconductors 39
List of Tables
Table 1: Manual contents................................................................................................................. 4

Table 2: Analysis Results Toolbar................................................................................................. 23

Table 3: Trace data fields description............................................................................................ 25

Table 4: Trace viewer events description.......................................................................................26

Table 5: Code Coverage Summary Table fields description table................................................. 31

Table 6: Code Coverage Details Table fields description table..................................................... 32

Table 7: Field description of Summary table.................................................................................34

Table 8: Field description of Details table..................................................................................... 34

Table 9: Buttons Available in Summary Table of Performance Viewer........................................35

Table 10: Call Tree fields description table................................................................................... 36

40 NXP
Semiconductors
Index
A
Add or Remove Function Range 28
Add or Remove Group 29
Analysis Results view 23

C
Change Color 28
Collecting trace data 15
Configuring Debug Launcher 8
Create new project 6

E
Edit Address Range of Function 28

M
Merge Groups or Functions 30

S
Setting up trace collection 5

T
Trace generators 16

V
View trace data 22

You might also like