This is the mail archive of the gcc@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]

Re: What is "init_dummy"?



  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


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