public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/19] cleanup of memory stats prototypes
@ 2017-07-27  8:30 tbsaunde+gcc
  2017-07-27  8:30 ` [PATCH 14/19] replace rtx_alloc_stat with c++ tbsaunde+gcc
                   ` (20 more replies)
  0 siblings, 21 replies; 31+ messages in thread
From: tbsaunde+gcc @ 2017-07-27  8:30 UTC (permalink / raw)
  To: gcc-patches

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

Trev

p.s. the issue with ddrs_table is that it ends up trying to add to the memory
stats hash table from a global constructor when that hash table hasn't yet been
constructed.


Trevor Saunders (19):
  use c++ instead of make_node_stat
  use c++ instead of _stat for copy_node_stat
  use cxx instead of make_tree_binfo_stat
  use c++ for make_int_cst_stat
  use c++ instead of buildN_stat{,_loc}
  use c++ instead of {make,grow}_tree_vec_stat
  replace gimple_alloc_stat with c++
  use c++ instead of build_decl_stat
  use c++ instead of build_vl_exp_stat
  use c++ for tree_cons_stat
  remove unused build_var_debug_value prototype
  use C++ for {make,build}_vector_stat
  use c++ for build_tree_list{,_vec}_stat
  replace rtx_alloc_stat with c++
  replace shallow_copy_rtx_stat with c++
  simplify the bitmap alloc_stat functions with c++
  use c++ for bitmap_initialize
  use c++ for gimple_build_debug_bind{,_source}
  use c++ for fold_buildN_loc

 gcc/bitmap.c          |   8 ++--
 gcc/bitmap.h          |  17 +++-----
 gcc/cp/lex.c          |   4 +-
 gcc/emit-rtl.c        |   2 +-
 gcc/fold-const.c      |  14 +++----
 gcc/fold-const.h      |  24 +++++-------
 gcc/fortran/resolve.c |   2 +-
 gcc/gengenrtl.c       |   2 +-
 gcc/gimple.c          |   8 ++--
 gcc/gimple.h          |  11 ++----
 gcc/rtl.c             |   4 +-
 gcc/rtl.h             |   6 +--
 gcc/tree.c            |  62 ++++++++++++++---------------
 gcc/tree.h            | 106 ++++++++++++++++++--------------------------------
 14 files changed, 109 insertions(+), 161 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-08-01  9:05 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27  8:30 [PATCH 00/19] cleanup of memory stats prototypes tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 14/19] replace rtx_alloc_stat with c++ tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 06/19] use c++ instead of {make,grow}_tree_vec_stat tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 08/19] use c++ instead of build_decl_stat tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 03/19] use cxx instead of make_tree_binfo_stat tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 04/19] use c++ for make_int_cst_stat tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 10/19] use c++ for tree_cons_stat tbsaunde+gcc
2017-07-27  8:30 ` [PATCH 07/19] replace gimple_alloc_stat with c++ tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 16/19] simplify the bitmap alloc_stat functions " tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 05/19] use c++ instead of buildN_stat{,_loc} tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 13/19] use c++ for build_tree_list{,_vec}_stat tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 02/19] use c++ instead of _stat for copy_node_stat tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 15/19] replace shallow_copy_rtx_stat with c++ tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 11/19] remove unused build_var_debug_value prototype tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 09/19] use c++ instead of build_vl_exp_stat tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 18/19] use c++ for gimple_build_debug_bind{,_source} tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 19/19] use c++ for fold_buildN_loc tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 17/19] use c++ for bitmap_initialize tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 12/19] use C++ for {make,build}_vector_stat tbsaunde+gcc
2017-07-27  8:31 ` [PATCH 01/19] use c++ instead of make_node_stat tbsaunde+gcc
2017-07-27  8:43 ` [PATCH 00/19] cleanup of memory stats prototypes Richard Biener
2017-07-28 16:32   ` Bernhard Reutner-Fischer
2017-07-29  1:08     ` Trevor Saunders
2017-07-29  1:10   ` Trevor Saunders
2017-07-31 18:33   ` Jeff Law
2017-07-31 20:56 ` Martin Sebor
2017-07-31 21:34   ` Trevor Saunders
2017-07-31 22:58     ` Martin Sebor
2017-07-31 23:11       ` Trevor Saunders
2017-08-01  0:11         ` Martin Sebor
2017-08-01  9:05           ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).