final.c (profile_function): Do not emit profile counters in the data section, if...
authorJeff Law <law@gcc.gnu.org>
Tue, 15 Aug 2000 15:25:50 +0000 (09:25 -0600)
committerJeff Law <law@gcc.gnu.org>
Tue, 15 Aug 2000 15:25:50 +0000 (09:25 -0600)
        * 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

gcc/tm.texi

index 008ee50e0d16f863c0de4b24a2276ee0efffdedf..6f714ad898c5b6a3d01aa725d56d931baa1a6750 100644 (file)
@@ -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