Re: [RFA] patch to add 'maint profile-gdb' command

Eli Zaretskii
2001-09-10T08:58:00Z

On Mon, 10 Sep 2001, Andrew Cagney wrote:

> a check of *BSD's man pages also points to monstartup() and profil(). i
> dont think you should be trying to implement those.

I'm not sure I understand--are you saying monstartup shouldn't be used by
this feature? If so, why not? I think it should be used if available,
since it avoids the annoying problem of profiling some random startup
code.

> (Eli?) should the doco include a reference to moncontrol(3)?

It's not clear to me why this is needed. Is this issue important for
some reason?

> would having the call in main() be better - turn it off at
> the earliest possible moment?

How about using __attribute__((constructor)) if available?