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] Statistics infrastructure, updated


On Tue, May 13, 2008 at 2:32 AM, Richard Guenther <rguenther@suse.de> wrote:
> On Mon, 12 May 2008, Seongbae Park (???, ???) wrote:
>
>  > I think it would be more useful if we convert
>  > prop_stats::{num_const_prop, num_copy_prop, num_dce,num_pre_folded}
>  > and pre_stats::{constified, pa_insert, eliminations}  into debug counters
>  > (pre_stats::insertions and phis seem to be purely statistics
>  > still overhead of using debug counter is low enough that it probably
>  > won't matter
>  > to simply use it for statistics)
>  > - that way,  we can have both statistics and debugging aid.
>  > Making debug counter dump per-pass-invocation statistics is straightforward,
>  > and I can easily make it dump per-function statistics as well.
>
>  If you cannot convert things like pre_stats::insertions (that would
>  require the ability to dynamically register new counters) then I don't
>  see how this would simplify the patch - it would only add to it.
>
>  The patch tries to handle per-function statistics (what -fdump-*-*-stats
>  does), per pass statistics per function (-fdump-statistics) and per
>  compilation-unit statistics (-fdump-statistics-stats).  Adding a helper
>  to be able to break in gdb with a condition like curr_stat ("foo") == 5
>  would be easy.  I have never used (nor did I know of) the debug counter
>  stuff, so I have no opinion on its usefulness.
>
>  So, show us/me the patch you are proposing ;)
>
>  Richard.

Attached is the (half-cooked) patch - it will currently only print
per-function-per-pass
but the rest is the matter of figuring out when to take the base
snapshot to compare against.
I've converted pre_stats to the proposed scheme as an example.

Seongbae


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