* statistical profiling of gcc
@ 2003-02-19 19:56 David Morrison
2003-02-19 20:15 ` Dale Johannesen
0 siblings, 1 reply; 2+ messages in thread
From: David Morrison @ 2003-02-19 19:56 UTC (permalink / raw)
To: gcc
Hi all,
I'm sure something like this must have been tried before, but on the
off-change it hasn't, I hacked in a line or two to gcc/main.c to set up
"jprof" to do statistical profiling on gcc runs. Here's a link to info
on jprof:
http://lxr.mozilla.org/mozilla/source/tools/jprof/README.html
It provides fairly detailed information that I've found useful on other
projects for diagnosing CPU usage hotspots. I used the resulting
compiler to compile gcc/expr.o - for no particularly good reason, just a
nice big file - with and without optimization. The full results can be
found here:
http://www.phenix.bnl.gov/~dave/gcc/expr_opt.html
and here:
http://www.phenix.bnl.gov/~dave/gcc/expr_noopt.html
The first part of the "flat" profile is shown below. The interrupt was
set for 1 ms and the "Count" should be roughly proportional to CPU time
spent in that routine. The full report has a lot more information.
Count Function Name
750 seen_objects
497 htab_traverse
279 ggc_set_mark
190 count_or_remove_death_notes
148 clear_table
139 compute_transp
117 verify_flow_info
95 ggc_alloc
95 side_effects_p
90 for_each_rtx
90 gt_ggc_mx_lang_tree_node
81 varray_clear
77 constrain_operands
77 sbitmap_vector_alloc
72 subst_reloads
69 gt_ggc_mx_rtx_def
Useful?
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: statistical profiling of gcc
2003-02-19 19:56 statistical profiling of gcc David Morrison
@ 2003-02-19 20:15 ` Dale Johannesen
0 siblings, 0 replies; 2+ messages in thread
From: Dale Johannesen @ 2003-02-19 20:15 UTC (permalink / raw)
To: David Morrison; +Cc: Dale Johannesen, gcc
On Wednesday, February 19, 2003, at 11:43 AM, David Morrison wrote:
> The first part of the "flat" profile is shown below. The interrupt
> was set for 1 ms and the "Count" should be roughly proportional to CPU
> time spent in that routine. The full report has a lot more
> information.
>
> Count Function Name
> 750 seen_objects
> 497 htab_traverse
> 279 ggc_set_mark
> 190 count_or_remove_death_notes
The only "seen_objects" I can find is a data object, so I think jprof
needs a little work.
Thanks for trying.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-19 20:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-19 19:56 statistical profiling of gcc David Morrison
2003-02-19 20:15 ` Dale Johannesen
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).