This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to fix -fverbose-asm (broken by GGC heuristics)


The patch below fixes output of GGC heuristics information, when
written to the assembler file by print_version. I also moved the
new output to after the initial version information, which seems
to make more sense.

Header of assembly file when using -fverbose-asm now looks as follows:

        .file   "a-calend.adb"
# GNU Ada version 3.4 20030227 (experimental) (i686-pc-linux-gnu)
#       compiled by GNU C version 3.4 20030227 (experimental).
# GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64367
# options passed:  -gnatgp -fverbose-asm
# options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
# -fpcc-struct-return -fgcse-lm -fgcse-sm -fsched-interblock -fsched-spec
# -fbranch-count-reg -fcommon -fverbose-asm -fgnu-linker -fargument-alias
# -fzero-initialized-in-bss -fident -fmath-errno -ftrapping-math
# -ftime-report -m80387 -mhard-float -mno-soft-float -mieee-fp
# -mfp-ret-in-387 -maccumulate-outgoing-args -mtune=pentiumpro -march=i386

Output of gnat1 --version:
GNU Ada version 3.4 20030227 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.4 20030227 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64367

Tested with full bootstrap of C and Ada on i686-pc-linux-gnu.
Please approve.

   -Geert


2003-02-27   Geert Bosch <bosch at gnat dot com>

	* toplev.c (print_version): Add indentation for GGC heuristics and
	output after printing version information.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.721
diff -u -r1.721 toplev.c
--- toplev.c	26 Feb 2003 10:48:34 -0000	1.721
+++ toplev.c	27 Feb 2003 19:43:02 -0000
@@ -4647,8 +4647,6 @@
      FILE *file;
      const char *indent;
 {
-  fnotice (file, "GGC heuristics: --param ggc-min-expand=%d --param ggc-min-heapsize=%d\n",
-	   PARAM_VALUE (GGC_MIN_EXPAND), PARAM_VALUE (GGC_MIN_HEAPSIZE));
 #ifndef __VERSION__
 #define __VERSION__ "[?]"
 #endif
@@ -4661,6 +4659,9 @@
 	   , indent, *indent != 0 ? " " : "",
 	   lang_hooks.name, version_string, TARGET_NAME,
 	   indent, __VERSION__);
+  fnotice (file, "%s%sGGC heuristics: --param ggc-min-expand=%d --param ggc-min-heapsize=%d\n",
+	   indent, *indent != 0 ? " " : "",
+	   PARAM_VALUE (GGC_MIN_EXPAND), PARAM_VALUE (GGC_MIN_HEAPSIZE));
 }
 
 /* Print an option value and return the adjusted position in the line.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]