This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[doc, committed] clean up -fauto-profile documentation


I saw that the documentation for the new -fauto-profile option needed a lot of work -- it had formatting and markup problems, terminology problems (e.g., "linux" is not a proper name by GNU documentation standards), and content problems like failure to document the filename default. I removed the previously documented optional requirement (?) for "An Intel processor with last branch record (LBR) support" as IIUC that is a property of perf and/or create_gcov and not of GCC's support for this option, which seems to have no target-specific component.

I also did minor cleanup on the -fprofile-generate and -fprofile-use options, which also had some of the same markup problems.

I've committed this under the "obvious fix" rule.

-Sandra

2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi ([-fprofile-generate], [-fprofile-use]):
	Fix markup, light copy-editing.
	([-fauto-profile]): Rewrite to fix formatting and content
	problems.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 219170)
+++ gcc/doc/invoke.texi	(working copy)
@@ -9325,7 +9325,7 @@ profile useful for later recompilation w
 optimization.  You must use @option{-fprofile-generate} both when
 compiling and when linking your program.
 
-The following options are enabled: @code{-fprofile-arcs}, @code{-fprofile-values}, @code{-fvpt}.
+The following options are enabled: @option{-fprofile-arcs}, @option{-fprofile-values}, @option{-fvpt}.
 
 If @var{path} is specified, GCC looks at the @var{path} to find
 the profile feedback data files. See @option{-fprofile-dir}.
@@ -9333,12 +9333,12 @@ the profile feedback data files. See @op
 @item -fprofile-use
 @itemx -fprofile-use=@var{path}
 @opindex fprofile-use
-Enable profile feedback directed optimizations, and optimizations
-generally profitable only with profile feedback available.
-
-The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
-@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}, @code{-ftree-vectorize},
-@code{ftree-loop-distribute-patterns}
+Enable profile feedback-directed optimizations, 
+and the following optimizations
+which are generally profitable only with profile feedback available:
+@option{-fbranch-probabilities}, @option{-fvpt},
+@option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer}, 
+@option{-ftree-vectorize}, and @option{ftree-loop-distribute-patterns}.
 
 By default, GCC emits an error message if the feedback profiles do not
 match the source code.  This error can be turned into a warning by using
@@ -9351,37 +9351,39 @@ the profile feedback data files. See @op
 @item -fauto-profile
 @itemx -fauto-profile=@var{path}
 @opindex fauto-profile
-Enable sampling based feedback directed optimizations, and optimizations
-generally profitable only with profile feedback available.
-
-The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
-@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}, @code{-ftree-vectorize},
-@code{-finline-functions}, @code{-fipa-cp}, @code{-fipa-cp-clone},
-@code{-fpredictive-commoning}, @code{-funswitch-loops},
-@code{-fgcse-after-reload}, @code{-ftree-loop-distribute-patterns},
-
-If @var{path} is specified, GCC looks at the @var{path} to find
-the profile feedback data files.
-
-In order to collect AutoFDO profile, you need to have:
-
-1. A linux system with linux perf support
-2. (optional) An Intel processor with last branch record (LBR) support. This is
-   to guarantee accurate instruction level profile, which is important for
-   AutoFDO performance.
-
-To collect the profile, first use linux perf to collect raw profile
-(see @uref{https://perf.wiki.kernel.org/}).
+Enable sampling-based feedback-directed optimizations, 
+and the following optimizations
+which are generally profitable only with profile feedback available:
+@option{-fbranch-probabilities}, @option{-fvpt},
+@option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer}, 
+@option{-ftree-vectorize},
+@option{-finline-functions}, @option{-fipa-cp}, @option{-fipa-cp-clone},
+@option{-fpredictive-commoning}, @option{-funswitch-loops},
+@option{-fgcse-after-reload}, and @option{-ftree-loop-distribute-patterns}.
+
+@var{path} is the name of a file containing AutoFDO profile information.
+If omitted, it defaults to @file{fbdata.afdo} in the current directory.
+
+Producing an AutoFDO profile data file requires running your program
+with the @command{perf} utility on a supported GNU/Linux target system.
+For more information, see @uref{https://perf.wiki.kernel.org/}.
 
 E.g.
-@code{perf record -e br_inst_retired:near_taken -b -o perf.data -- your_program}
+@smallexample
+perf record -e br_inst_retired:near_taken -b -o perf.data \
+    -- your_program
+@end smallexample
 
-Then use create_gcov tool, which takes raw profile and unstripped binary to
-generate AutoFDO profile that can be used by GCC.
-(see @uref{https://github.com/google/autofdo}).
+Then use the @command{create_gcov} tool to convert the raw profile data
+to a format that can be used by GCC.@  You must also supply the 
+unstripped binary for your program to this tool.  
+See @uref{https://github.com/google/autofdo}.
 
 E.g.
-@code{create_gcov --binary=your_program.unstripped --profile=perf.data --gcov=profile.afdo}
+@smallexample
+create_gcov --binary=your_program.unstripped --profile=perf.data \
+    --gcov=profile.afdo
+@end smallexample
 @end table
 
 The following options control compiler behavior regarding floating-point 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]