brprof(1) CLIX brprof(1)
NAME
brprof - Runs the Branch Profiling Processing Tool
SYNOPSIS
brprof [-i input_file] [counter_file] [-o output_file] [-r report_file]
[-A control [,control]
FLAGS
-i input_file Reads the program structure information from the
input_file rather than from a.out, the default executable
file.
-o output_file Writes the output file containing feedback information to
the output_file instead of brstat.in, the default output
file.
-r report_file Writes the statistics summary report to the report_file
instead of brprof.out, the default report file. A report
is generated only if the -Abrreport flag is used with
this flag.
-A control_spec[, control_spec]
Implements a general control interface, which supports
the same syntax as the -A flag in the CLIPPER Advanced
Optimizing C and FORTRAN compilers. The control_spec may
have the following formats: control=value,
control=(value), or control(value). The following list
of controls and corresponding values are supported:
brprof
namelist Processes only the selected functions
and subroutines in the namelist. The
namelist value consists of one or
more specifiers, each with the form
filename:routine_name and separated
by commas. The entire namelist must
be enclosed in parenthesis is more
than one value is specified. Each
routine_name is the name of a C
routine, or FORTRAN subroutine or
function subprogram. Specifications
in the filename are separated by
commas, blanks, tabs, or new lines.
With the filename:routine_name form,
the colon may or may not be required.
If the filename is omitted, the colon
2/94 - Intergraph Corporation 1
brprof(1) CLIX brprof(1)
is not required and the routine_name
in all files is selected. If the
filename is not an absolute pathname,
the path control specifies which
directories are to be searched. If
the routine_name is omitted, the
colon is required and all routines in
the filename are selected.
%none Does not select functions, routines,
subroutines, or the main program for
processing. This is a special value
and must appear first in the
namelist. This special value is not
permitted in the named files.
%all Selects all functions, routines,
subroutines, and the main program for
processing. This is a special value
and must appear first in the
namelist. This special value is not
permitted in the named files.
%allminus Selects all routines except for files
listed in namelist. This is a
special value and must appear first
in the namelist. This special value
is not permitted in the named files.
%allminusfile
Selects all routines except those
specified in namelist. This is a
special value and must appear first
in the namelist. This special value
is not permitted in the named files.
%file Selects all routines specifed in the
namelist. This is a special value
and must appear first in the
namelist. This special value is not
permitted in the named files.
brreport Requests a statistics summary report. The
following values control the kinds of
information produced in the report.
none Does not generate a report.
verbose Generates a verbose report with a
count for each block in the selected
function.
2 Intergraph Corporation - 2/94
brprof(1) CLIX brprof(1)
callsum Reports only the number of times a
selected function is called.
tcov Generates a test-coverage report for
each selected function.
brmargin Controls the margin width in the report
generated when using brreport=tcov. The value
of this control is n, which has a range of 5 to
14. The n defines the maximum margin width in
the report, including the << and >> delimiters.
path Adds a pathname to each file in the namelist
designated by brprof until either the file is
found or the list is exhausted.
DESCRIPTION
The brprof command runs the Branch Profiling Processing Tool, which runs
in conjunction with the branch-profiling feature of the CLIPPER Advanced
Optimizing C and FORTRAN compilers. The input consists of an executable
file (a.out by default) and one or more counter files (brcount.out by
default) . An output file (brstat.in by default) is produced and can be
used to guide optimizations during the recompilation of an executable
file. A report file summarizing the generated statistics can be
requested.
To use brprof, first compile the program, with branch profiling enabled in
at least one function, subroutine, procedure, or in the main program. The
compiler inserts branch-counting code into the portions of the program
selected. The linker is requested to link in a special startup module
containing code for writing the counter information to a counter file.
Thus, whenever the resulting executable file is run, a counter file is
automatically generated. Once the counter file is created, run brprof to
uncompress the counter information and collate it with information, saved
in a special section in the executable file, concerning the flow structure
of the program. To use the collated statistics file in a recompilation,
invoke the compilation with flags that tell the compiler where to find the
profiling information and how to make use of it.
FILES
a.out Default executable file.
brstat.in Default output (feedback) file.
brprof.out Default report file.
brcount.out Default counter file.
DIAGNOSTICS
2/94 - Intergraph Corporation 3
brprof(1) CLIX brprof(1)
The diagnostics produced by this command are intended to be self-
explanatory.
DIAGNOSTICS
Diagnostics produced by this command are intended to be self-explanatory.
RELATED INFORMATION
Commands: acc(1), af77(1)
4 Intergraph Corporation - 2/94