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: [PATCH 00/19] cleanup of memory stats prototypes


On Thu, Jul 27, 2017 at 10:43:09AM +0200, Richard Biener wrote:
> On Thu, Jul 27, 2017 at 10:30 AM,  <tbsaunde+gcc@tbsaunde.org> wrote:
> > From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> > The preC++ way of passing information about the call site of a function was to
> > use a macro that passed __file__, __LINE__, and __FUNCTION__ to a function with
> > the same name with _stat appended to it.  The way this is now done with C++ is
> > to have arguments where the default value is __LINE__, __FILE__, and
> > __FUNCTION__ in the caller.  This has the significant advantage that if you
> > look for "^function (" you find the correct function, where in the C way of
> > doing things you need to realize its a macro and check the definition of the
> > macro to see what to look for next.  So this removes a layer of indirection,
> > and makes things somewhat more consistant in using the C++ way of doing things.
> >
> > patches independently bootstrapped and regtested on ppc64le-linux-gnu.  I
> > successfully ran make all-gcc with --enable-gather-detailed-mem-stats, but
> > couldn't complete a bootstrap before the series was applied, because the
> > ddrs_table in tree-loop-distribution.c causes memory statistics gathering to crash before the series as well as after it.  ok?
> 
> Thanks!  This was on my list of things todo...

no problem, it kept annoying me to find things.

> The series is ok.
> 
> Did you catch all of MEM_STAT_INFO/ALONE_MEM_STAT_INFO so we can remove the
> non-C++ way from statistics.h?

 Looks like ALONE_MEM_STAT_INFO is now effectively unused, but a few odd
 uses of MEM_STAT_INFO remain.  I'll try and look at finishing that off.

 Trev


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