This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is "init_dummy"?
- To: Benjamin Redelings I <bredelin at ucsd dot edu>
- Subject: Re: What is "init_dummy"?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 06 Jan 1998 10:39:21 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <34B17A02.CE9E1801@ucsd.edu>you write:
> Hmm... perhaps there is a problem here. I was trying to find out why
> init_dummy takes 77% of the CPU time in my program. It isn't because
> I'm using a bad test case... Most of the CPU time is NOT spent
> initializing global constructurs, but in actual processing. (I can tell
> because the program is interactive).
That would tend to indicate a problem of some kind -- either in the init
code (which is also used to register EH information) or in the profiling
code.
init_dummy should be called once for the main program and once for each
shared library you use. Furthermore, all init_dummy does is call another
routine in libgcc.a.
So if it's taking 77% of your cpu time, I would suspect a problem elsewhere,
like in the profiling code. Note that some profiling systems will sometimes
"charge" the wrong routine for cpu time (when using sampling based profiling).
This tends to happen with trivially small functions. What are the functions
immediately before and immediately after init_dummy? Odds are the time is
being spent in one of those functions, not init_dummy.
jeff