dcpitopstalls - List slow instructions on Alpha 21064/EV4 and
dcpitopstalls [<flags>] image-file [image-file ...]
Given one or more image-files and some profile files, dcpitopstalls
identifies the N instructions in the images responsible for the most stall
cycles. N defaults to 100.
The output has the form:
1104066 samples (99.99% of all samples) had estimate conf >= medium confidence.
728719 stall cycles with estimate conf >= medium confidence.
Stall cycles of conf >= medium confidence represent 65.99% of all samples.
top 10 stalls of length >= 0:
% cum% cycles count C avg blame pc procedure file:line
10.0% 10.0% 109885 4998 H 22.0 d 0x12000957c compress compress.c:484
9.9% 19.8% 108776 5513 H 19.7 d 0x120009530 compress compress.c:477
7.8% 27.6% 85668 3836 H 22.3 d 0x12000959c compress compress.c:488
3.0% 30.6% 33412 5513 H 6.1 ? 0x120009518 compress compress.c:467
2.0% 32.6% 22153 2343 H 9.5 d 0x120010fb4 decompress compress.c:731
1.3% 33.9% 14169 2343 H 6.0 dDw 0x120010fa8 decompress compress.c:728
1.3% 35.2% 14102 5513 H 2.6 I 0x120009638 compress compress.c:510
1.0% 36.2% 11385 1516 H 7.5 d 0x120010fd8 decompress compress.c:728
0.9% 37.1% 9861 2343 H 4.2 p 0x120009558 compress compress.c:481
In the listing, each line covers one instruction. The "%" column is the
percentage of all cycles samples that were charged to stalls at the
instruction. The "cum%" column is a running total of the "%" column. The
"cycles" column is the number of cycles samples attributed to stalls. The
"count" column is the execution count of the instruction. The "C" column is
the confidence level of the count: 'L' for low, 'M' for medium, and 'H' for
high confidence. The "avg" column is the average length of the stall (=
cycles / count). The "blame" column identifies the possible causes for the
stall using the same 1-character codes as
dcpicalc(1). The "pc" column is the PC of the instruction. The
"procedure" column is the name of the procedure containing the instruction
or, if the name has been stripped, procedure's entry address. If more than
one image-file is supplied, an additional column identifies which image
contains the procedure. The "file:line" column is the source file name and
line number associated with the instruction.
- Print information about options.
- -min int
- Specifies the minimum average stall length; stalls of fewer cycles
will be tallied but not listed. Defaults to 0.
- -n int
- Specifies the maximum number of instructions to list. Defaults to
- Omit the file:line column so that the output is more
likely to fit in 80 columns.
- Print program version information.
EXECUTION COUNT AND STALL ANALYSIS FLAGS
The following options can be used to control the heuristics for estimating
execution counts and identifying the causes of stalls.
- Generate low, medium, and high confidence data.
- Generate medium and high confidence data. (default)
- Generate only high confidence data.
- -cross_procedure [optimistic | pessimistic | selective]
- Choose what assumption to make when a procedure call
boundary is encountered while looking for reasons to explain
dynamic stalls. A procedure call boundary is either a call
made by the procedure being analyzed or the beginning or end
of that procedure. With pessimistic, assume that
whatever happens outside the analyzed procedure can cause a
dynamic stall inside it. With optimistic, assume that
it cannot. With selective, the assumption is based on
standard procedure call convention. (The default is
- Use a (non-linear time) constraint solver to exploit
global flow constraints when estimating execution counts.
The estimates may still violate flow constraints.
- -tab foo.tab
- Get execution counts from output of
dcpix(1) instead of making estimates,
which may be inaccurate. Requires a .xct
which may be
- -xct_factor num
- Scales counts from .xct files by num. Useful when you run a program once under dcpix(1) but multiple (num) times under dcpid(1) to get more samples. Used in conjunction with -tab and -xct.
PROFILE SELECTION FLAGS
By default, this command automatically finds all of the relevant profile
files. The following options can be used to guide the search for the profile
- -db <directory name>
- Search for profile files in the specified profile database directory.
The directory name should be the same name as the one specified when
dcpid was started. If this option is not specified, the directory name
is obtained from the DCPIDB environment variable. If neither this
option, nor the DCPIDB environment variable are set, the name of
the directory used by the last invocation of dcpid on this machine
is used. If none of these methods succeed in finding the appropriate
directory, and no explicit set of profile files is provided via the
-profiles option, then the command fails.
- -epoch latest
- Search for profile files in the latest epoch. This is the default.
- -epoch latest-k
- Search for profile files in the "k+1"th oldest epoch. For example,
search in the third oldest epoch if -epoch latest-2 is
- -epoch <name>
- Search for profile files in the named epoch. The epoch name should be
the name of a subdirectory corresponding to a single epoch within the
profile database directory. Epoch subdirectory names usually take the
form YYYYMMDDHHMM (year-month-day-hours-minutes). For example,
an epoch started on June 11, 2002 at 22:33 would be named
200206112233. If an epoch is given a symbolic name by creating a
symbol link to the actual epoch directory, then the symbolic name can
also be used as an argument to the -epoch option.
- -epoch all
- Search for profile files in all epochs.
- -ihost <hostnames...> --
- Include just those profile files associated with the
specified host names. The list of host names must be
terminated either via -- or by the end of the option list.
The command prints an error message and fails if both the
-ihost and -ehost options are specified.
- -ehost <hostnames...> --
The list of
-- or by the
end of the
- -label <label>
- Search for profile files with the specified label(s) (see dcpilabel(1)). This option can be repeated multiple times. If no labels are specified on the command line, profile file labels are ignored entirely. If any labels are specified on the command line, only profile files that have one of the specified labels are used.
- -profiles <file names...> --
- Use just the profile files named by the specified file names. The list of profile file names can be terminated either via --, or by the end of the option list. The command prints an error message and fails if the -profiles option is used in conjunction with any of the earlier automatic profile finding options. (Use the automatic profile lookup mechanism, or explicitly name the profile file with the -profile option; but don't do both.)
STATISTIC SELECTION FLAGS
Different kinds of performance counter statistics are available on various
models of Alpha CPUs. Alpha 21064/EV4, 21164/EV5 and 21264/EV6 CPUs have
traditional aggregate event counters. Alpha 21264A/EV67 and later processors
have a mix of some traditional aggregate event counters and newer ProfileMe
counters which allow accurate and precise instruction execution profiles on
out-of-order processors. (See
dcpiprofileme(1) for more information on ProfileMe statistics.)
The default statistic selection on an aggregate counter machine is to
select all the aggregate events. The default on a ProfileMe machine is to
select ProfileMe retire delay, retire count, !retired (i.e. aborted) count,
!notrap (i.e. trap) count, and aggregate cycles.
The options below can be used to select various statistics when available.
Use -event for aggregate statistics and -pm for ProfileMe
statistics. Note: there can be multiple, mixed -event and -pm
specifications. You can also specify the ratio of two statistics (written as
- -pm pm_stat(+pm_stat)
- Select the specified ProfileMe statistic plus any added in by optional
+pm_stat specifications. For example, select various trap statistics by
specifying the option -pm trap+replays+ldstorder+mispredict.
- -pm default(+pm_stat)
- Select the default set of ProfileMe statistics plus those added in by
+pm_stat specifications. At least one additional statistic is mandatory;
-pm default without modifications is extraneous and not allowed. The
additional ProfileMe statistics will take the place of the aggregate cycles
statistic which is selected by default.
- -pm all(-pm_stat)
- Select all ProfileMe statistics less those subtracted out. You can
repeat the optional -pm_stat specification to deselect multiple
ProfileMe statistics. Note: there are a lot of ProfileMe statistics.
Unless you deselect a bunch of them, this will select more statistics
than are appropriate for human consumption.
- -event ag_stat(+ag_stat)
- Select the specified aggregate statistic plus any added in by
optional +ag_stat specifications. For example, select cycles,
icache misses, and data cache misses when the option -event
cycles+imiss+dmiss is specified.
- -event all(-ag_stat)
- Select all aggregate statistics less those subtracted out. You can
repeat the optional -ag_stat specification to deselect multiple
- Select profile events corresponding to all event types, both
aggregate and ProfileMe. However, if there are ProfileMe events, this
will produce a large number of statistics, which in most cases will not
dcpitopstalls -conf_low -n 50 -min 3 a.out
Dcpitopstalls works only on Alpha 21064/EV4 and 21164/EV5 processors. For
Alpha 21264/EV6 and later processors, use
The source file name and line number information, which is extracted from
the symbol table, is inaccurate for some optimized programs.
Because an internal DCPI interface was not designed for whole-program
analysis, the running time of this program is quadratic rather than linear
in size of the image file. Thus, this program may run slowly on large image
For more information, see the DCPI project home page
Hewlett-Packard Company. All rights reserved.