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 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?

Both sollutions looks bit ugly to me, but pehraps your's is better ;)
Thanks!
Honza


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