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: Fix --enable-detailed-mem-stats


On Fri, Apr 15, 2005 at 03:34:37PM -0400, Daniel Jacobowitz wrote:
> On Fri, Apr 15, 2005 at 04:54:29PM +0200, Jan Hubicka wrote:
> > 
> > Hi,
> > --enable-gather-detailed-mem-stats broke with the merge of zone collector (that
> > is quite unforutunate as the memory tester stopped for a while and memory
> > consumption is up considerably).
> > The problem is the trick of passing location info only when declaration is
> > enabled like this:
> >     t = ggc_alloc_zone_stat (length, &tree_id_zone PASS_MEM_STAT);
> > When ggc_alloc_zone_stat is a macro, the call still has two arguments so we
> > can't throw away the redundant &tree_id_zone while calling ggc_alloc_zone.
> > 
> > Only way to fix it I see is to turn this inline.  Problem is that then without
> > optimization we end up referencing zone pointers even for non-zone garbage
> > collector so we need placeholders.
> > 
> > Does this look resonable?  Bootstrapped/regtested i686-pc-gnu-linux
> 
> I apologize.  I had a patch to fix this but I never got around to
> submitting it; I didn't realize you were running an automatic tester...
> 
> I think this is a nicer solution.  How about you?

> 2005-04-15  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* ggc.h (ggc_alloc_zone_pass_stat): New macro.
> 	(ggc_alloc_zone_stat): Don't define.
> 	* ggc-zone.c (ggc_alloc_typed_stat, ggc_alloc_stat): Use
> 	ggc_alloc_zone_pass_stat.
> 	* rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Likewise.
> 	* tree.c (make_node_stat, copy_node_stat, make_tree_binfo_stat)
> 	(make_tree_vec_stat, tree_cons_stat, build1_stat): Likewise.

Ping.  Is this patch OK?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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