]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
authorsandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Nov 2018 01:04:04 +0000 (01:04 +0000)
committersandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Nov 2018 01:04:04 +0000 (01:04 +0000)
PR other/40498

gcc/
* doc/extend.texi (Common Function Attributes): Document that
no_instrument_function applies to -p and -pg, too.
* doc/invoke.texi (Instrumentation Options): Add cross-references
to docs for -p, -pg, and -finstrument-functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266260 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/doc/extend.texi
gcc/doc/invoke.texi

index 62dd38eef7b70ba70732a38dc7ba0abcd12007a7..dd7984c741891c5ac1345cd3acc0d4980c001409 100644 (file)
@@ -1,3 +1,11 @@
+2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+       PR other/40498
+       * doc/extend.texi (Common Function Attributes): Document that
+       no_instrument_function applies to -p and -pg, too.
+       * doc/invoke.texi (Instrumentation Options): Add cross-references
+       to docs for -p, -pg, and -finstrument-functions.
+
 2018-11-18  Alan Modra  <amodra@gmail.com>
 
        * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
index 2d00d67fcd72be808b79fcb125e10b2a6bef8079..d230da977d4f7e229c3d0e396d6e380fa3e7bcb3 100644 (file)
@@ -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 417a9bcc3e625d12505b21fbfa64d16e3e633879..f4fc182a24e885504e1be7e703b671dea91b5aa0 100644 (file)
@@ -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 listed above, high-priority
 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