aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2018-11-18 20:04:04 -0500
committerSandra Loosemore <sandra@gcc.gnu.org>2018-11-18 20:04:04 -0500
commit662076c9faa2a712196faa766482c79632091828 (patch)
treefe16a6268fefda48b538db31b75aae80318265e9 /gcc
parent45f27e5c6cae6be08879d2596b036135e75f66d6 (diff)
downloadgcc-662076c9faa2a712196faa766482c79632091828.zip
gcc-662076c9faa2a712196faa766482c79632091828.tar.gz
gcc-662076c9faa2a712196faa766482c79632091828.tar.bz2
re PR other/40498 (no_instrument_function attribute not documented to prevent -pg instrumentation)
2018-11-18 Sandra Loosemore <sandra@codesourcery.com> 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. From-SVN: r266260
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/doc/extend.texi5
-rw-r--r--gcc/doc/invoke.texi17
3 files changed, 21 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 62dd38e..dd7984c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 2d00d67..d230da9 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -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.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 417a9bc..f4fc182 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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