RealView ® Debugger TraceUser Guide

Version 3.1

Table of Contents

About this book
Intended audience
Using this book
Typographical conventions
Timing diagram conventions
Further reading
Feedback on RealView Debugger
Feedback on this book
1. Introduction to Tracing
1.1. About Tracing in RealView Debugger
1.2. Requirements for tracing
1.2.1. Trace hardware
1.2.2. Simulators
1.2.3. See also
1.3. Features for setting up the conditionsfor trace capture
1.3.1. Capturing data trace
1.3.2. Capturing trace information for profiling
1.3.3. See also
1.4. Tracing with RealView Debugger commands
1.4.1. See also
1.5. Available resources
1.5.1. Trace hardware with an ETM-enabledARM processor
1.5.2. RealView ARMulator ISS
1.5.3. See also
1.6. Using the examples
2. Getting Started with Tracing
2.1. Preparations for tracing
2.1.1. See also
2.2. About the trace hardwaresetup
2.2.1. ASIC that supports trace
2.2.2. Trace Port Analyzer
2.2.3. JTAG interface unit
2.2.4. See also
2.3. About the Analysis window
2.3.1. Displaying the Analysis window
2.3.2. Equivalent CLI commands for various Analysis windowfeatures
2.3.3. See also
2.4. Basic RealView Debugger tracingprocedure
2.4.1. See also
2.5. Connecting to an analyzer
2.5.1. Procedure
2.5.2. See also
2.6. Disconnecting from the Analyzer
2.6.1. See also
2.7. Enabling and disabling tracing
2.7.1. Procedure
2.7.2. See also
2.8. Automatically connecting to an analyzeron target connection
2.8.1. See also
2.9. Setting up new trace conditions ona running core
2.9.1. See also
2.10. Capturing trace output
2.10.1. Displaying captured trace on a stopcondition
2.10.2. See also
2.11. Profiling trace information
2.11.1. Profiling with ETM-enabled hardware
2.11.2. Profiling with RVISS
2.11.3. See also
3. Configuring the Conditions for Trace Capture
3.1. Setting up the global conditions fortrace capture
3.1.1. See also
3.2. Setting up the conditions for profilingcaptured trace
3.2.1. See also
3.3. Capturing trace without using tracepoints
3.3.1. See also
3.4. Capturing trace with tracepoints
3.4.1. See also
3.5. Setting tracepoints
3.5.1. See also
3.6. Setting tracepoints on exception vectors
3.6.1. See also
3.7. Configuring common trace options
3.7.1. Configuring analyzer settings forETM-enabled targets
3.7.2. Setting the size of the trace buffer(RVISS targets only)
3.7.3. Storing only control-flow changes
3.7.4. Configuring the behavior when thetrace buffer is full
3.7.5. Configuring how trace informationis collected at a trigger
3.7.6. Specifying the type of informationto collect for data transfer instructions
3.7.7. Configuring automatic tracing
3.7.8. Setting and Editing Event Triggers
3.7.9. Clearing All Event Triggers
3.7.10. Configuring the address and signalcontrols of your target processor
3.7.11. See also
4. Configuring the ETM
4.1. About configuring the ETM
4.1.1. See also
4.2. Displaying the Configure ETM dialogbox
4.2.1. Configure ETM dialog box for ETMv1
4.2.2. Configure ETM dialog box for ETMv3
4.2.3. See also
4.3. Configuring the ETMparameters
4.3.1. Trace data width
4.3.2. Trace port mode (ETMv1)
4.3.3. Trace port mode (ETMv3)
4.3.4. Trace buffer packing
4.3.5. FIFO overflow protection
4.3.6. Trace coproc registertransfer
4.3.7. Extended external input selection(ETMv3.1 and later)
4.3.8. Memory map decode
4.3.9. Synchronization frequency (ETMv3)
4.3.10. Enable Timestamping
4.3.11. Cycle accurate tracing
4.3.12. Data only trace (Do not trace instructions)(ETMv3.1 and later)
4.3.13. Suppress data on FIFO full
4.3.14. ETM Pairing
4.3.15. See also
4.4. Equivalent ETM_CONFIG CLI commandqualifiers
5. Tracepoints in RealView Debugger
5.1. About tracepoints
5.1.1. See also
5.2. Tracepoint types
5.2.1. Trigger
5.2.2. Trace Start Point and Trace End Point
5.2.3. Trace Range
5.2.4. ExternalOut Points
5.2.5. See also
5.3. Setting trace ranges in conjunctionwith trace start and end points
6. Setting Unconditional Tracepoints
6.1. About setting unconditional tracepoints
6.1.1. See also
6.2. Capturing instructions and data
6.2.1. See also
6.3. Setting a trigger point
6.3.1. Procedure
6.3.2. See also
6.4. Setting a trace start and end point
6.4.1. Procedure
6.4.2. See also
6.5. Setting a trace range
6.5.1. Procedure
6.5.2. See also
6.6. Setting an ExternalOut Point
6.6.1. Procedure
6.6.2. See also
6.7. Equivalent CLI commands used by theNew Tracepoint dialog box
6.7.1. See also
6.8. Setting a trace range for selectedsource lines or disassembly
6.8.1. CLI command used for setting an instruction-only tracerange
6.8.2. See also
6.9. Setting unconditional tracepointswith the Set/Edit Tracepoint dialog box
6.9.1. RVISS connections
6.9.2. ETM-based targets
6.9.3. See also
6.10. Setting tracepoints from your FavoritesList
6.10.1. Procedure
7. Setting Conditional Tracepoints
7.1. About setting conditional tracepoints
7.1.1. See also
7.2. Common parameters for setting conditionaltracepoints
7.2.1. Tracepoint types
7.2.2. Tracepoint comparison types
7.2.3. Entering addresses, address ranges,and data address comparisons
7.2.4. Entering data value comparisons
7.2.5. External Conditions
7.2.6. See also
7.3. Setting a tracepoint to trace a specificmemory access
7.3.1. Procedure
7.3.2. See also
7.4. Setting a tracepoint to trace a specificdata value
7.4.1. Procedure
7.4.2. See also
7.5. Setting tracepoints to test for external conditions
7.5.1. Procedure
7.5.2. See also
7.6. Setting a tracepoint that activatesafter a number of passes
7.6.1. Procedure
7.6.2. See also
7.7. Setting tracepoints to trace accessesof a specific size
7.7.1. Procedure
7.7.2. See also
7.8. Setting tracepoints to trace instructionexecution status
7.8.1. Procedure
7.8.2. See also
7.9. Setting tracepoints to trace accesseson a specific security level
7.9.1. Procedure
7.9.2. See also
7.10. Using the Trace on X after Y [and/orZ] dialog box
7.10.1. Setting a Trace on X after Y [and/or Z] tracepointchain
7.10.2. See also
7.11. Using the Trace on X after Y executedN times dialog box
7.11.1. Setting a Trace on X after Y executed N times tracepointchain
7.11.2. See also
7.12. Using the Trace on X after A==B dialogbox
7.12.1. Setting a Trace on X after A==B tracepoint chain
7.12.2. See also
7.13. Using the Trace if A==B in X dialogbox
7.13.1. Setting a Trace if A==B in X tracepoint chain
7.13.2. See also
7.14. Chaining tracepoints
7.14.1. Chaining tracepoints with commandqualifiers
7.14.2. See also
8. Managing Tracepoints
8.1. About managing tracepoints
8.1.1. See also
8.2. Editing tracepoints
8.2.1. See also
8.3. Disabling tracepoints
8.4. Deleting tracepoints
8.5. Creating tracepoint favorites
8.5.1. Before you start
8.5.2. Procedure
8.5.3. See also
8.6. Finding source code correspondingto a tracepoint
8.6.1. Procedure
9. Analyzing trace Information
9.1. Displaying the Analysis window
9.1.1. Understanding the current state ofthe trace
9.2. Changing the displayed trace details
9.2.1. Changing the columns displayed inthe Trace view
9.2.2. Displaying all trace entries
9.2.3. Displaying instructions for traceentries
9.2.4. Displaying data for trace entries
9.2.5. Displaying instruction boundaries
9.2.6. Displaying function boundaries
9.2.7. Interleaving source with the traceoutput
9.2.8. Displaying inferredregisters
9.2.9. Displaying the captured trace foreach processor in a multiprocessor system
9.2.10. See also
9.3. Viewing the captured trace
9.3.1. About the Trace tab
9.3.2. Tracking trace buffer lines in theCode window
9.3.3. Calculating the time between two points
9.3.4. Showing the currentposition relative to the trigger point
9.3.5. Changing the default format of timeinformation
9.3.6. Specifying the processor speed forcycle/time computations
9.3.7. Automatically updating the trace informationin the Analysis window
9.3.8. Updating the captured trace information
9.3.9. Copying trace to the clipboard
9.3.10. Clearing the trace buffer
9.3.11. See also
9.4. Finding information in captured trace
9.4.1. Finding the location of the triggerpoint
9.4.2. Finding a specificelement number in the trace output
9.4.3. Finding a specifictimestamp value
9.4.4. Finding a specific address
9.4.5. Finding a specific data value
9.4.6. Finding a specificsymbol name
9.4.7. Finding the next instance of the previouslysearched item
9.4.8. Finding the previous instance of thepreviously searched item
9.4.9. See also
9.5. Filtering information in capturedtrace
9.5.1. Filtering for specific element numbers
9.5.2. Filtering for specific timestamp values
9.5.3. Filtering for specific addresses
9.5.4. Filtering for specific data values
9.5.5. Filtering for specific symbol names
9.5.6. Filtering for specific access types
9.5.7. Filtering for specific percentagesof execution time
9.5.8. Setting the AND condition for selectedfilters
9.5.9. Setting the OR condition for selectedfilters
9.5.10. Inverting the sense of the selectedfilters
9.5.11. Clearing filters
9.5.12. See also
9.6. Status lines in the captured trace
9.6.1. Error messages
9.6.2. Warning messages
9.6.3. See also
9.7. Viewing source for the captured trace
9.7.1. See also
9.8. Viewing captured profilinginformation
9.8.1. Abandoning the profiling operation
9.8.2. Collecting profiling data
9.8.3. Changing the columns displayed inthe Profile view
9.8.4. Viewing call-graphdata in the Profile view
9.8.5. Interpreting profiling data
9.8.6. Sorting profiling information
9.8.7. See also
9.9. Copying selected text from the traceoutput
9.10. Saving and loading trace information
9.10.1. Trace file formats
9.10.2. Saving the trace bufferto a file
9.10.3. Saving a filtered trace buffer toa file
9.10.4. Loading the trace bufferfrom a file
9.10.5. Closing a loaded file
9.11. Changing the current connection
9.11.1. See also
9.12. Attaching the Analysis window to thecurrent connection
9.12.1. See also
9.13. Mapping Analysis window options toCLI commands and qualifiers
9.13.1. File menu options
9.13.2. Edit menu options
9.13.3. View menu options
9.13.4. Find menu options
9.13.5. Filter menu options
9.13.6. See also
10. Tracing Tutorial
10.1. About the tracing tutorial
10.1.1. About the trace hardware
10.1.2. About the sample application
10.2. Preparing to start the tracing tutorial
10.2.1. Procedure
10.3. Running from application reset toa breakpoint
10.3.1. Tracing features used
10.3.2. Procedure
10.3.3. Examining the captured trace
10.3.4. See also
10.4. Running to a second breakpoint
10.4.1. Tracing features used
10.4.2. Procedure
10.4.3. Examining the captured trace
10.4.4. Interleaving source in the Trace view
10.4.5. See also
10.5. Using a trace start point
10.5.1. Tracing features used
10.5.2. Procedure
10.5.3. Examining the captured trace
10.5.4. See also
10.6. Using trace start and end points totrace and time a function
10.6.1. Tracing features used
10.6.2. Procedure
10.6.3. Examining the captured trace
10.6.4. Considerations when performing timing measurements
10.6.5. See also
10.7. Comparing trace start and end pointswith a trace range
10.7.1. Tracing features used
10.7.2. Tracing with trace start and end points
10.7.3. Examining trace captured with trace start and endpoints
10.7.4. Tracing with a trace range
10.7.5. Examining trace captured with a trace range
10.7.6. See also
10.8. Excluding a trace range to avoid tracinga function
10.8.1. Tracing features used
10.8.2. Procedure
10.8.3. Examining the captured trace
10.8.4. See also
10.9. Tracing data with auto trace
10.9.1. Tracing features used
10.9.2. Procedure
10.9.3. Examining the captured trace
10.9.4. Displaying instruction boundaries
10.9.5. Displaying function boundaries
10.9.6. Displaying inferredregisters
10.9.7. See also
10.10. Tracing data with trace ranges
10.10.1. Tracing features used
10.10.2. Procedure
10.10.3. Examining the captured trace
10.10.4. See also
10.11. Tracing data accesses to a specificaddress
10.11.1. Tracing features used
10.11.2. Procedure
10.11.3. Examining the captured trace
10.11.4. See also
10.12. Tracing data accesses to addressesin an address range
10.12.1. Tracing features used
10.12.2. Procedure
10.12.3. Examining the captured trace
10.12.4. See also
10.13. Collecting trace on a running target
10.13.1. Tracing features used
10.13.2. Capturing trace by disconnecting andconnecting the analyzer
10.13.3. Capturing trace by disabling tracing
10.13.4. Displaying capturing trace with atrigger
10.13.5. Examining trace captured with a trigger
10.13.6. See also
10.14. Using triggers to collect trace arounda specific instruction
10.14.1. Tracing features used
10.14.2. Capturing trace before a trigger
10.14.3. Capturing trace around a trigger
10.14.4. Capturing trace after a trigger
10.14.5. Examining the captured trace
10.14.6. See also
10.15. Using triggers to collect trace arounda specific data access
10.15.1. Tracing features used
10.15.2. Capturing trace before a trigger
10.15.3. Capturing trace around a trigger
10.15.4. Capturing trace after a trigger
10.15.5. Examining the captured trace
10.15.6. See also
10.16. Capturing profilinginformation
10.16.1. Tracing features used
10.16.2. Capturing the initial profiling information
10.16.3. Examining the profiling data
10.16.4. Summing profiling data over multipleruns
10.16.5. Profiling results obtained with 4-bit data width andQuad packing
10.16.6. See also
10.17. Setting up a conditional tracepoint
10.17.1. Tracing features used
10.17.2. Procedure
10.17.3. See also
A. Setting up the Trace Hardware
A.1. RealView Trace and RealView ICE
A.1.1. See also
A.2. Embedded Trace Buffer and RealViewICE
A.2.1. See also
B. Setting up the Trace Software
B.1. ETM and RealView Trace
B.1.1. Customizing a RealView ICE Debug Configurationto autoconnect the trace analyzer
B.1.2. See also
B.2. ETB and RealView ICE
B.2.1. Configuring RealView ICE to access the ETB
B.2.2. See also
B.3. CoreSight ETM and RealView Trace
B.3.1. Configuring your CoreSight development platform
B.3.2. See also
B.4. CoreSight ETB and RealView ICE
B.4.1. Configuring your CoreSight development platform
B.4.2. Configuring RealView ICE to accessthe CoreSight ETB
B.4.3. See also

List of Figures

1. Key to event timing diagram conventions
2.1. Trace hardware setup with ETM
2.2. Trace hardware setup with ETB
2.3. Trace hardware setup with CoreSightETM
2.4. Trace hardware setup with CoreSightETB
2.5. Analysis window
2.6. Connection Properties window
2.7. Prompt displayed on a running target(tracepoints)
2.8. Prompt displayed on a running target(global trace conditions)
3.1. Setting the size of the trace buffer
4.1. The Configure ETM dialog box forETMv1
4.2. The Configure ETM dialog box forETMv3
5.1. Trace start and end points withina trace range
5.2. Trace end point within a trace range
6.1. New Tracepoint dialog box
6.2. New Tracepoint dialog box
6.3. New Tracepoint dialog box
6.4. New Tracepoint dialog box
6.5. Set/Edit Tracepoint dialog box (RVISStargets)
6.6. Set/Edit Tracepoint dialog box (ETM-basedtargets)
6.7. Favorites/Chooser Editor dialog box
7.1. Set/Edit Tracepoint dialog box
7.2. Set/Edit Tracepoint dialog box
7.3. Set/Edit Tracepoint dialog box
7.4. Set/Edit Tracepoint dialog box
7.5. Set/Edit Tracepoint dialog box
7.6. Set/Edit Tracepoint dialog box
7.7. Set/Edit Tracepoint dialog box
7.8. Trace on X after Y [and/or Z] dialogbox
7.9. Trace on X after Y executed N timesdialog box
7.10. Trace on X after A==B dialog box
7.11. Trace if A==B in X dialog box
8.1. The Break/Tracepoints pane
8.2. Set/Edit Tracepoint dialog box
8.3. Favorites/Chooser Editor dialog box
8.4. New/Edit Favorite dialog box
9.1. Example of the Analysis window
9.2. Example of inferred registers
9.3. Connection menu
9.4. Time measurement from selected linedialog box
9.5. Time measurement from trigger dialogbox
9.6. Defining processor speed
9.7. Finding a position match
9.8. Finding a time match
9.9. Finding an address expression match
9.10. Finding a data value match
9.11. Finding a symbol name match
9.12. Filtering on a position match
9.13. Filtering on a time match
9.14. Filtering on an address expressionmatch
9.15. Filtering on a data value match
9.16. Filtering on a symbol name match
9.17. Filtering on an access type match
9.18. Filtering on a percent time match
9.19. Profile tab
9.20. Example histogram
9.21. Example of call-graph information
9.22. Example call-graph data (Parent/Child%ages Relative to Whole Time)
9.23. Example call-graph data (Parent/Child%ages Relative to Function B=>E)
9.24. Example call-graph data (Parent/Child%ages Relative to Parent/Child B=>E)
10.1. Memory Map tab
10.2. Image details in the memory map
10.3. Analysis window
10.4. Simple breakpoint set to force displayof captured trace
10.5. Captured trace shown in the Analysiswindow
10.6. Debug state entered
10.7. Tracing stops before the breakpointedinstruction
10.8. Execution stopped in Init() function
10.9. Simple breakpoint set to force displayof captured trace
10.10. Captured trace shown in the Analysiswindow
10.11. Select trace sample
10.12. Source line corresponding to selecttrace sample
10.13. Interleaved source in the Trace view
10.14. Trace Start Point set
10.15. Trace capture from a Trace StartPoint
10.16. Trace Start Point set at start ofa function
10.17. Trace End Point set at end of a function
10.18. Captured trace
10.19. Trace discontinuity
10.20. Disassembly view
10.21. Trace Start Point set
10.22. Disassembly view
10.23. Trace End Point set
10.24. Captured trace in Analysis window
10.25. Searched function in Trace view
10.26. Source code corresponding to searchedfunction
10.27. Searched address in the Trace view
10.28. Disassembly view
10.29. Start of Trace Range set
10.30. Disassembly view
10.31. End of Trace Range set
10.32. Captured trace in Analysis window
10.33. Captured trace showing function callsonly are traced
10.34. Break/Tracepoints pane showing atracepoint
10.35. Disassembly view
10.36. Trace Start Point set
10.37. Start of Excluded Trace Range setat line 142
10.38. End of Excluded Trace Range set atline 151
10.39. Captured trace in Analysis window
10.40. Searched function in Trace view
10.41. Captured trace near the GetData()function
10.42. Captured trace near the GetAverage()function
10.43. Watch pane
10.44. Captured trace in Analysis window
10.45. Data/Hex column displayed in theAnalysis window
10.46. Searched function in Trace view
10.47. Data trace samples for SendData()
10.48. Corresponding source view
10.49. Write of average to output_port
10.50. Instruction boundaries in the traceview
10.51. Function boundaries in the traceview
10.52. Inferred registers in the Trace tab
10.53. Start of Trace Range set
10.54. End of Trace Range set
10.55. Captured trace in Analysis window
10.56. Captured trace showing discontinuitybetween runs of SendData()
10.57. Filtered address in the Trace view
10.58. Set/Edit Tracepoint dialog box
10.59. Captured trace in Analysis window
10.60. Captured trace of data reads fromaverage
10.61. Disassembly view of the input[] array
10.62. Trace range set in the disassemblyview
10.63. Captured trace of data reads fromthe input[] array
10.64. Source code corresponding to capturedtrace
10.65. Captured trace from a running target
10.66. Captured trace after disabling tracefor a running target
10.67. Prompt to stop tracing when settinga tracepoint
10.68. Trace captured with a trigger
10.69. Trace captured before a trigger
10.70. Captured trace before the triggerpoint
10.71. Trace captured around a trigger
10.72. Captured trace around the triggerpoint
10.73. Trace captured after a trigger
10.74. Captured trace after the triggerpoint
10.75. Captured trace from RealView Tracewhen stopped at a trigger
10.76. Captured trace after 10 passes
10.77. Set/Edit Tracepoint dialog box
10.78. Trace captured before a trigger
10.79. Captured trace before the trigger
10.80. Set/Edit Tracepoint dialog box
10.81. Trace captured around a trigger
10.82. Captured trace around the trigger
10.83. Set/Edit Tracepoint dialog box
10.84. Trace captured after a trigger
10.85. Captured trace after the trigger
10.86. Captured trace for the port trigger
10.87. Captured trace for the ETM protocoltrigger
10.88. Setting a trace start point
10.89. Results displayed in the Profiletab (Normal packing)
10.90. Call-graph data displayed in theProfile tab
10.91. Call-graph data for Func_2
10.92. Summing profiling data over multipleruns
10.93. Results displayed in the Profiletab (Quad packing)
10.94. Trace on X after Y executed N timesdialog box
10.95. Completed conditional tracepointdialog box
10.96. Break/Tracepoints pane with conditionaltracepoints set
10.97. Trace line for the trigger point
A.1. Connections for RealView ICE andRealView Trace
B.1. RVConfig dialog box
B.2. Device Properties dialog box
B.3. CSETM registers in the Registerspane
B.4. CSTPIU registers in the Registerspane
B.5. CSETB registers in the Registerspane
B.6. RVConfig dialog box
B.7. Device Properties dialog box

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarksowned by ARM Limited. Other brands and names mentioned herein maybe the trademarks of their respective owners.

Neither the whole nor any part of the information containedin, or the product described in, this document may be adapted orreproduced in any material form except with the prior written permissionof the copyright holder.

The product described in this document is subject to continuousdevelopments and improvements. All particulars of the product andits use contained in this document are given by ARM in good faith.However, all warranties implied or expressed, including but notlimited to implied warranties of merchantability, or fitness forpurpose, are excluded.

This document is intended only to assist the reader in theuse of the product. ARM Limited shall not be liable for any lossor damage arising from the use of any information in this document,or any error or omission in such information, or any incorrect useof the product.

Where the term ARM is used it means “ARM or any of its subsidiariesas appropriate”.


This document is Non-Confidential. The right to use, copyand disclose this document may be subject to license restrictionsin accordance with the terms of the agreement entered into by ARMand the party that ARM delivered this document to.

Product Status

The information in this document is final, that is for a developedproduct.

Revision History
Revision A March2006 Release v3.0 for RVDS v3.0
Revision B March2007 Release v3.1 for RVDS v3.1
Copyright © 2006, 2007 ARM Limited. All rights reserved. ARM DUI 0322B