Index: doc/extend.texi =================================================================== --- doc/extend.texi (revision 266245) +++ doc/extend.texi (working copy) @@ -3015,7 +3015,10 @@ semantically equivalent function. @item no_instrument_function @cindex @code{no_instrument_function} function attribute @opindex finstrument-functions -If @option{-finstrument-functions} is given, profiling function calls are +@opindex p +@opindex pg +If any of @option{-finstrument-functions}, @option{-p}, or @option{-pg} are +given, profiling function calls are generated at entry and exit of most user-compiled functions. Functions with this attribute are not so instrumented. Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 266246) +++ doc/invoke.texi (working copy) @@ -11980,21 +11980,21 @@ program analysis purposes. @table @gcctabopt @cindex @command{prof} +@cindex @command{gprof} @item -p +@itemx -pg @opindex p -Generate extra code to write profile information suitable for the -analysis program @command{prof}. You must use this option when compiling -the source files you want data about, and you must also use it when -linking. - -@cindex @command{gprof} -@item -pg @opindex pg Generate extra code to write profile information suitable for the -analysis program @command{gprof}. You must use this option when compiling +analysis program @command{prof} (for @option{-p}) or @command{gprof} +(for @option{-pg}). You must use this option when compiling the source files you want data about, and you must also use it when linking. +You can use the function attribute @code{no_instrument_function} to +suppress profiling of individual functions when compiling with these options. +@xref{Common Function Attributes}. + @item -fprofile-arcs @opindex fprofile-arcs Add code so that program flow @dfn{arcs} are instrumented. During @@ -12742,6 +12742,7 @@ example, for the profiling functions lis interrupt routines, and any functions from which the profiling functions cannot safely be called (perhaps signal handlers, if the profiling routines generate output or allocate memory). +@xref{Common Function Attributes}. @item -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @opindex finstrument-functions-exclude-file-list