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]

Re: [RFC] Patch: RAM-based heuristics for ggc-min-heapsize and ggc-min-expand


> The recent discussion about ggc-min-heapsize and ggc-min-expand here:
> http://gcc.gnu.org/ml/gcc/2003-01/msg01361.html
> http://gcc.gnu.org/ml/gcc/2003-01/msg01368.html
> inspired me to write something to dynamically choose default values
> depending on the total physical memory size.
> 
> I think this approach is better than simply raising the value, since
> it avoids hosing smaller boxes.  It's also better IMHO than an
> adaptive algorithm based on available RAM or page faults in that this
> way it is deterministic.  (At least it is for a given amount of RAM.)
> 

> 
> 2003-02-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
> 
> gcc:
> 	* Makefile.in (ggc-common.o): Depend on $(PARAMS_H)
> 	* ggc-common.c: Include params.h
> 	(ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
> 	init_ggc_heuristics): New functions.
> 	* ggc.h (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
> 	init_ggc_heuristics): Prototype.
> 	* toplev.c (parse_options_and_default_flags): Call
> 	init_ggc_heuristics.
> 
> include:
> 	* libiberty.h (physmem_total, physmem_available): Prototype.
> 
> libiberty:
> 	* Makefile.in (CFILES): Add physmem.c.
> 	(REQUIRED_OFILES): Add physmem.o.
> 	* configure.in: Check for sys/pstat.h.
> 	(checkfuncs): Add pstat_getstatic and pstat_getdynamic.
> 	* physmem.c: New file, copied from textutils.
> 
> 	* config.in, configure: Regenerated.

Wouldn't it make sense for the "gcc" driver program to determine these 
values and pass them in as parameters to cc1?  Then compilations would be 
repeatable across multiple machines since -v would show us what values 
were in use.

R.


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