aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>2000-08-15 09:25:50 -0600
committerJeff Law <law@gcc.gnu.org>2000-08-15 09:25:50 -0600
commit980e2067790a3972283b3eab5923802ef92bc185 (patch)
tree8af773eb4ba2478b2f09f2fff302d953bdcc692a
parentf99fce0c53a352c7d1918ad90968480524076243 (diff)
downloadgcc-980e2067790a3972283b3eab5923802ef92bc185.zip
gcc-980e2067790a3972283b3eab5923802ef92bc185.tar.gz
gcc-980e2067790a3972283b3eab5923802ef92bc185.tar.bz2
final.c (profile_function): Do not emit profile counters in the data section, if NO_PROFILE_COUNTERS is defined.
* final.c (profile_function): Do not emit profile counters in the data section, if NO_PROFILE_COUNTERS is defined. * tm.texi: Document NO_PROFILE_COUNTERS. Update doc for FUNCTION_PROFILER. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define. (FUNCTION_PROFILER): Just emit a call to mcount. Restoring tm.texi after corruption. From-SVN: r35709
-rw-r--r--gcc/tm.texi26
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/tm.texi b/gcc/tm.texi
index 008ee50..6f714ad 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -3502,18 +3502,24 @@ These macros will help you generate code for profiling.
@item FUNCTION_PROFILER (@var{file}, @var{labelno})
A C statement or compound statement to output to @var{file} some
assembler code to call the profiling subroutine @code{mcount}.
-Before calling, the assembler code must load the address of a
-counter variable into a register where @code{mcount} expects to
-find the address. The name of this variable is @samp{LP} followed
-by the number @var{labelno}, so you would generate the name using
-@samp{LP%d} in a @code{fprintf}.
@findex mcount
-The details of how the address should be passed to @code{mcount} are
-determined by your operating system environment, not by GCC. To
-figure them out, compile a small program for profiling using the
-system's installed C compiler and look at the assembler code that
-results.
+The details of how @code{mcount} expects to be called are determined by
+your operating system environment, not by GCC. To figure them out,
+compile a small program for profiling using the system's installed C
+compiler and look at the assembler code that results.
+
+Older implementations of @code{mcount} expect the address of a counter
+variable to be loaded into some register. The name of this variable is
+@samp{LP} followed by the number @var{labelno}, so you would generate
+the name using @samp{LP%d} in a @code{fprintf}.
+
+@findex NO_PROFILE_COUNTERS
+@item NO_PROFILE_COUNTERS
+Define this macro if the @code{mcount} subroutine on your system does
+not need a counter variable allocated for each function. This is true
+for almost all modern implementations. If you define this macro, you
+must not use the @var{labelno} argument to @code{FUNCTION_PROFILER}.
@findex PROFILE_BEFORE_PROLOGUE
@item PROFILE_BEFORE_PROLOGUE