This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Statistics infrastructure, updated
- From: Richard Guenther <rguenther at suse dot de>
- To: Seongbae Park (박성배, 朴成培) <seongbae dot park at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>, Zdenek Dvorak <ook at ucw dot cz>
- Date: Tue, 13 May 2008 11:32:47 +0200 (CEST)
- Subject: Re: [PATCH] Statistics infrastructure, updated
- References: <Pine.LNX.4.64.0804261917140.4130@zhemvz.fhfr.qr> <ab3a61990805121540n5c85067clca51da1b271b913b@mail.gmail.com>
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.