]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
from 2000-07-12 Zack Weinberg <zack@wolery.cumb.org>
authorDavid O'Brien <obrien@FreeBSD.org>
Tue, 20 Mar 2001 19:51:59 +0000 (19:51 +0000)
committerDavid O'Brien <obrien@gcc.gnu.org>
Tue, 20 Mar 2001 19:51:59 +0000 (19:51 +0000)
* 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.

from 2000-10-02  David O'Brien  <obrien@dragon.nuxi.com>
* config/i386/freebsd.h (NO_PROFILE_COUNTERS): Define.

Approved by:  Bernd Schmidt <bernds@redhat.com>
              <Pine.LNX.4.30.0103191549340.1311-100000@host140.cambridge.redhat.com>

From-SVN: r40669

gcc/ChangeLog
gcc/config/i386/freebsd-elf.h
gcc/final.c
gcc/tm.texi

index 41bbf78a10bc855202238581559051fd8dd53693..190cc59ebc2b29c5025ffb46f32814c710d93d23 100644 (file)
@@ -1,3 +1,14 @@
+2001-03-20  David O'Brien  <obrien@FreeBSD.org>
+
+       from 2000-07-12  Zack Weinberg  <zack@wolery.cumb.org>
+       * 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.
+
+       from 2000-10-02  David O'Brien  <obrien@dragon.nuxi.com>
+       * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Define.
+
 2001-03-19  Bernd Schmidt  <bernds@redhat.com>
 
        * version.c: Bump.
index e97d4ca07bb269d29be8aa3c194a4cf1fce5c729..4e450204094104d73811fe253cc1f2bfdff00bd0 100644 (file)
@@ -135,6 +135,9 @@ Boston, MA 02111-1307, USA.  */
  : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
  : (-1))
 
+#undef  NO_PROFILE_COUNTERS
+#define NO_PROFILE_COUNTERS
+
 /* Tell final.c that we don't need a label passed to mcount.  */
 
 #undef FUNCTION_PROFILER
index 11cfebf346244304379e4c92bb35dc76cdcd05d7..d12ec87ec475634fb62cc1caace5d97e25237d30 100644 (file)
@@ -1701,7 +1701,9 @@ static void
 profile_function (file)
      FILE *file;
 {
+#ifndef NO_PROFILE_COUNTERS
   int align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE);
+#endif
 #if defined(ASM_OUTPUT_REG_PUSH)
 #if defined(STRUCT_VALUE_INCOMING_REGNUM) || defined(STRUCT_VALUE_REGNUM)
   int sval = current_function_returns_struct;
@@ -1711,10 +1713,12 @@ profile_function (file)
 #endif
 #endif /* ASM_OUTPUT_REG_PUSH */
 
+#ifndef NO_PROFILE_COUNTERS
   data_section ();
   ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
   ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
   assemble_integer (const0_rtx, LONG_TYPE_SIZE / BITS_PER_UNIT, 1);
+#endif
 
   function_section (current_function_decl);
 
index a13c6d97424bcfbbe94eaf3d983fafb9331b832a..484c73c10dc1f656eb24ed90d05d596f646318bc 100644 (file)
@@ -3464,6 +3464,13 @@ figure them out, compile a small program for profiling using the
 system's installed C compiler and look at the assembler code that
 results.
 
+@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
 Define this macro if the code for function profiling should come before