Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/3.0.x
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30945
Added Files:
profile.xml
Log Message:
First import.
--- NEW FILE: profile.xml ---
<?xml version="1.0" ?>
<!--
$Id: profile.xml,v 1.1 2007/08/21 21:10:16 xfred Exp $
This is free software.
For details, see the GNU Public License in the COPYING file, or
Look http://www.fsf.org
-->
<options>
<option id="profile-generate">
<value>-fprofile-arcs</value>
<compilation type="first-pass"/>
<short-description>Instrument arcs during compilation</short-description>
<editor-description>
Here's GCC 3.1.x help (3.0.x's not given) :
Instrument arcs during compilation to generate coverage data or for
profile-directed block ordering. During execution the program
records how many times each branch is executed and how many times
it is taken. When the compiled program exits it saves this data to
a file called sourcename.da for each source file.
For profile-directed block ordering, compile the program with
-fprofile-arcs plus optimization and code generation options, generate
the arc profile information by running the program on a
selected workload, and then compile the program again with the same
optimization and code generation options plus -fbranch-probabilities.
The other use of -fprofile-arcs is for use with "gcov", when it is
used with the -ftest-coverage option. GCC supports two methods of
determining code coverage: the options that support "gcov", and
options -a and -ax, which write information to text files. The
options that support "gcov" do not need to instrument every arc in
the program, so a program compiled with them runs faster than a
program compiled with -a, which adds instrumentation code to every
basic block in the program. The tradeoff: since "gcov" does not
have execution counts for all branches, it must start with the execution
counts for the instrumented branches, and then iterate over
the program flow graph until the entire graph has been solved.
Hence, "gcov" runs a little more slowly than a program which uses
information from -a and -ax.
With -fprofile-arcs, for each function of your program GCC creates
a program flow graph, then finds a spanning tree for the graph.
Only arcs that are not on the spanning tree have to be instrumented:
the compiler adds code to count the number of times that
these arcs are executed. When an arc is the only exit or only
entrance to a block, the instrumentation code can be added to the
block; otherwise, a new basic block must be created to hold the
instrumentation code.
This option makes it possible to estimate branch probabilities and
to calculate basic block execution counts. In general, basic block
execution counts as provided by -a do not give enough information
to estimate all branch probabilities.
</editor-description>
<logic/>
</option>
<option id="profile-use">
<value>-fbranch-probabilities</value>
<compilation type="second-pass" first-pass="profile-generate"/>
<short-description>Optimizations based on path guessing</short-description>
<editor-description>
After running a program compiled with -fprofile-arcs, you can compile it a
second time using -fbranch-probabilities, to improve
optimizations based on guessing the path a branch might take.
</editor-description>
<logic/>
</option>
</options>
|