This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] add a configure flag for GATHER_STATISTICS
- From: Dan Nicolaescu <dann at ics dot uci dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Nov 2003 11:45:00 -0800
- Subject: [patch] add a configure flag for GATHER_STATISTICS
The code that gathers more detailed memory usage statistics (in
ggc-page.c, tree.c and cp/*) is protected by a GATHER_STATISTICS
ifdefs. The only way to enable that code was to add a
#define GATHER_STATISTICS by hand.
This patch adds a configure flag for doing that.
The flag name could be improved, suggestions are welcome.
Probably GATHER_STATISTICS should be renamed in another, suggestions
for a better name are also welcome.
Please also take a look at the patch at:
http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00407.html
that improves a little bit the memory usage stats.
I don't have commit access.
2003-11-17 Dan Nicolaescu <dann@ics.uci.edu>
* configure.in (gather-detailed-mem-stats): New flag.
* configure:
* config.in: Regenerate.
* doc/install.texi (Configuration): Document
--enable-gather-detailed-mem-stats.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.749
diff -c -3 -p -r1.749 configure.in
*** configure.in 31 Oct 2003 09:58:46 -0000 1.749
--- configure.in 17 Nov 2003 19:45:10 -0000
*************** esac],
*** 483,488 ****
--- 483,496 ----
[coverage_flags=""])
AC_SUBST(coverage_flags)
+ AC_ARG_ENABLE(gather-detailed-mem-stats,
+ [ --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering], [],
+ [enable_gather_detailed_mem_stats=no])
+ if test x$enable_gather_detailed_mem_stats = xyes ; then
+ AC_DEFINE(GATHER_STATISTICS, 1,
+ [Define to enable detailed memory allocation stats gathering.])
+ fi
+
# -------------------------------
# Miscenalleous configure options
# -------------------------------
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.233
diff -c -3 -p -r1.233 install.texi
*** doc/install.texi 5 Nov 2003 22:26:58 -0000 1.233
--- doc/install.texi 17 Nov 2003 19:45:10 -0000
*************** want to disable optimization, for perfor
*** 1077,1082 ****
--- 1077,1087 ----
enable optimization. When coverage is enabled, the default level is
without optimization.
+ @item --enable-gather-detailed-mem-stats
+ When this option is specfied more detailed information on memory
+ allocation is gathered. This information is printed when using
+ @option{-fmem-report}.
+
@item --enable-nls
@itemx --disable-nls
The @option{--enable-nls} option enables Native Language Support (NLS),