| |||
| Home > RealView Debugger Commands > Alphabetical command reference > TRACEBUFFER | |||
The TRACEBUFFER command manipulates the contents and display of the program execution trace buffer.
TRACEBUFFER ,subcommand [,qualifier]
="text"
TRACEBUFFER ,subcommand =value
TRACEBUFFER ,subcommand
where:
subcommandThe possible commands are described in Description.
qualifierThe possible qualifiers are described in Description.
textThe name of a file or program symbol.
valueA numeric value or range, for example 4 or 5..8.
The TRACEBUFFER command manipulates the
program execution and data trace buffer associated with a trace
analyzer, enabling you to save, load, find, and filter the data.
The actions are differentiated using the ,
and are described in the section Subcommands.subcommand
Trace operation is described in detail in the RealView Debugger v3.0 Trace User Guide.
The possible listed
in the syntax are described in the following sections:subcommands
,TRACEBUFFERdfile ="loafilename"
Load a file into the trace buffer for extra analysis. is
the name of the file to load, and must be quoted.filename
You can include one of more environment variables in the filename.
For example, if MYPATH defines the location C:\Myfiles,
you can specify:
TRACEBUFFER,loadfile '$MYPATH\mytrace.dat'
The file must have been saved using the savefile subcommand
with the qualifier full, minimal,
or profile, or the GUI equivalent.
,TRACEBUFFERefile [ ,ascii | ,full | ,minimal | ,profile] [,append] [,filtered] ="savfilename"
Save the trace buffer to a file, where:
asciiSave lines of text as displayed in the current tab of the Analysis window. This format cannot be loaded into the RealView Debugger analysis window.
fullSave the whole trace buffer as a binary file in an RealView Debugger internal format.
minimalSave
only timing, address, and access type data from the trace buffer
as a binary file in a RealView Debugger internal format. The files created
are much smaller than the full format, but some
information is lost.
profileSave
only execution profile data from the trace buffer as a binary file
in a RealView Debugger internal format. The files created are smaller than the minimal format,
but only include enough information to display execution profiles.
appendAppend the new trace data to an existing file. Do not append data in one format to files in a different format.
filteredApply the selected display filters when saving trace data. If not specified, the entire trace buffer is saved, regardless of selected display filters.
filenameThe name of the file to write the data to. If the full argument
is specified, the filename extension is ignored. If the full argument
is not specified, then the filename must use a known extension (.trc, .trm, .trp,
or .txt).
You can include one of more environment variables in the filename.
For example, if MYPATH defines the location C:\Myfiles,
you can specify:
TRACEBUFFER,savefile '$MYPATH\mytrace.dat'
,TRACEBUFFERefileclos
Unload the data from the last file loaded with loadfile and clear the Analysis window.
,TRACEBUFFERount =amsize
This subcommand is deprecated. Specify the number of captured trace records to read from the trace buffer. There is a default value that normally corresponds to the entire trace buffer. Set this if you do not require analysis of all of the captured trace buffer.
The value of is
one of:size
0The default buffer size. Normally this is the whole buffer, but see your analyzer documentation for full details.
nThe maximum number of records to read.
n..mThe range of records to read, with 0 being
the trigger record, if any, and the start of the buffer point if
not triggered. If you have a trigger record, you can use negative
values to reference records before the trigger.
For example, if a trigger is specified then 10..200 means
read 190 records starting 10 records after the analyzer triggered.
If no trigger is specified, the same string, 10..200,
means to read the 190 records starting 10 records into the buffer.
To read the records around the trigger position in the buffer,
you can specify -20..20.
,TRACEBUFFERtime =scalescale
Set the units for time values displayed in the Analysis window,
where is:scale
0The default units
1Picoseconds (10-12 seconds)
2Nanoseconds (10-9 seconds)
3Microseconds (10-6 seconds)
4Milliseconds (10-3 seconds)
5Seconds
6Cycles.
For ARM ETM, the default units are nanoseconds, and you cannot use scale 6, cycles.
,speed =TRACEBUFFERmhz
Set the speed of the target processor clock for use in cycle-to-time
conversions, where is
the clock frequency in MHz. The default value is 20MHz. For example:mhz
TRACEBUFFER,speed=40
sets the speed to 40MHz, so that a period of 400 cycles is considered to take 400/40E6 seconds, or 10 microseconds.
,find_triggerTRACEBUFFER
Searches for the trigger position in the trace buffer. If found, the item is selected and the Analysis window display is centered on it. There are no arguments.
,TRACEBUFFERition =find_posposition
Searches for the indicated position or set of positions in
the trace buffer, where is
an integer or range:position
nThe position to find.
n..mFind the first in a range of positions from to n inclusive.m
n..+oFind the first in a range of positions from to n inclusive.n+o
The values and n can
be negative if a trigger is defined. If any of the positions is
found, the first is selected and the Analysis window display is
centered on it. m
,TRACEBUFFERe =find_timtime
Searches for the indicated time or range of times in the trace
buffer, where is
an integer or range:time
nThe time to find.
n..mFind the first in a range of times from to n inclusive.m
n..+oFind the first in a range of times from to n inclusive.n+o
The values and n can
be negative if a trigger is defined. If any of the times are found, the
first is selected and the Analysis window display is centered on
it.m
,TRACEBUFFERddress =find_aaddress
Searches for the indicated address or set of positions in
the trace buffer, where is
an integer or range:address
nThe address to find.
n..mFind the first in a range of addresses from to n inclusive.m
n..+oFind the first in a range of addresses from to n inclusive.n+o
If any of the addresses are found, the first is selected and the Analysis window display is centered on it.
,TRACEBUFFERata =find_ddbval
Searches for the indicated data bus value or set of values
in the trace buffer, where is
an integer or range:dbval
nThe data bus value to find.
n..mFind the first in a range of data bus values from to n inclusive.m
n..+oFind the first in a range of data bus values from to n inclusive.n+o
The values and n can
be negative. If any of the values are found, the first is selected and
the Analysis window display is centered on it. m
,TRACEBUFFERame ="find_ntext"
Searches for the supplied .
The search is based on a textual search of the information in the
Symbolic column of the analysis window. If found, the record is selected
and the Analysis window display is centered on it.text
,TRACEBUFFERfilter =posposition
Restricts the trace buffer information displayed in the Analysis
window based on a positions or set of positions, where is
an integer or range:position
nThe position to display.
n..mDisplay the range of positions from to n inclusive. m can
be negative.n
n..+oDisplay the range of positions from to n inclusive.n+o
The values and n can
be negative if a trigger is defined. Positions are displayed in
the mElem column of the Analysis window.
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERefilter =timtime
Restricts the trace buffer information displayed in the Analysis
window based on a time or range of times in the current time scale
units, where is
an integer or range:time
nThe time to display.
n..mDisplay the range of times from to n inclusive.m
n..+oDisplay the range of times from to n inclusive.n+o
The values and n can
be negative if a trigger is defined. You can use cycle numbers instead
of time values. Applying a filter to the trace buffer does not lose
information unless you save the trace with the mfiltered qualifier.
See Savefile for more
information.
,TRACEBUFFERfilter =addraddress
,TRACEBUFFERessfilter =addraddress
Restricts the trace buffer information displayed in the Analysis
window based on an address or range of addresses, where is
an integer or range:address
nThe address to display.
n..mDisplay the range of addresses from to n inclusive.m
n..+oDisplay the range of addresses from to n inclusive.n+o
You cannot specify addresses symbolically with addressfilter.
Use namefilter instead.
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERefilter ="namname"
Restricts the trace buffer information displayed in the Analysis
window based on a symbolic name, where is
a single string. The symbol names used by this filter are displayed
in the Symbolic column of the Analysis window.name
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERentfilter =percpercent
Restricts the trace buffer information displayed in the Analysis
window based on an percentage of the buffer, where is
an integer or range:percent
nThe percentage to display.
n..mDisplay the range of percentages from to n inclusive.m
n..+oDisplay the range of percentages from to n inclusive.n+o
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERfilter =dvalvalue
,TRACEBUFFERaluefilter =datavvalue
Restricts the trace buffer information displayed in the Analysis
window based on an data value or range of values, where is
an integer or range:value
nThe value to display.
n..mDisplay the range of value from to n inclusive.m
n..+oDisplay the range of value from to n inclusive.n+o
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERefilter =typmask
,TRACEBUFFEResstypefilter =accmask
Restricts the trace buffer information displayed in the Analysis
window based on an access type, where is
a bitwise-OR of the following values:mask
0x001Code access.
0x002Data access.
0x004Instruction prefetch.
0x008DMA.
0x010Interrupt.
0x020Bus transaction.
0x040Probe collection.
0x080Pin or signal change.
0x100Non-trace error.
Applying a filter to the trace buffer does not lose information
unless you save the trace with the filtered qualifier.
See Savefile for more
information.
,TRACEBUFFERfilterclear
Remove any and all of the filters applied to the trace buffer, so that the Analysis window displays all the collected trace information.
,TRACEBUFFER_filteror
Specifies that, if multiple filter conditions are applied
to the trace buffer, the trace data is displayed if any of the filters
display it. That is, the display is the union of all the filters.
This is the initial state and you can change it using and_filter.
Specifying or_filter overrides a previously active and_filter setting,
and the change is applied to the Analysis window immediately.
,TRACEBUFFER_filterand
Specifies that, if multiple filter conditions are applied
to the trace buffer, the trace data is displayed only if all of
the filters display it. That is, the display is the intersection
of all the filters. Specifying and_filter overrides
a previously active or_filter setting and the
change is applied to the Analysis window immediately.
TRACEBUFFER ,invert_filter
Invert the sense of the specified filter conditions.
For example, if you specify posfilter and Datavaluefilter,
then:
with and_filter specified,
the filtering process returns trace information for the areas of
execution except where both the position and data value match criteria you
have entered are satisfied
for or_filter specified, the
filtering process returns trace information for the areas of execution
except where either the position or data value match criterion you
have entered is satisfied.
,TRACEBUFFERelativepos_r
Specifies that the element (position) numbering used in the Elem column
of the Analysis window is relative to the trigger position, so that
the trigger record is numbered 0, the record
before (in time) the trigger is -1, and the record
after is 1.
,TRACEBUFFERbsolutepos_a
Specifies that the element (position) numbering used in the Elem column
of the Analysis window is absolute, so that the record captured
first is numbered 0, and records captured later
are numbered in increasing sequence.
You cannot use this mode with the ARM ETM because records are always relative to a trigger.
The following examples show how to use TRACEBUFFER:
TRACEBUFFER,timefilter
49.9..50.1Set a filter that displays
in the Analysis window only trace records captured 0.1 time unit
before and after 50 time units. You set time units with scaletime.
TRACEBUFFER,savefile,full
="tracerun.trc"Save the whole of
the current trace buffer, because no filtering is applied, to a
file in the current directory called tracerun.trc.
TRACEBUFFER,find_name
="main"Search through the Analysis
window for the first occurrence of the text main,
and display it.
The following commands provide similar or related functionality: