This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Re: Profiling gdb?


Perhaps some other time.  I do _use_ monstartup, however.

This patch should address all comments from the last three times this
came up.  I chose to use monstartup/_mcleanup instead of using
moncontrol; when someone wants to use this on a system without those
functions, _then_ we can decide how to handle it.  That's just my
opinion though.  What I've done should work for at least GNU/Linux and
FreeBSD, and that's enough to be useful.  It only comes in if you
configure it on, anyway.

It works like a charm; absolutely beautifully.  Thoughts, all?
(Unfortunatly, I've also leant a few things about how profiling works ... :-().

I think the commands should always be present - conditional on the corresponding function being present. Enabling / disabling the profiler is orthogonal to compiling with -pg. I'm not sure about the unpublished _moncleanup() call. Are you sure of monstartup()'s function signature (ari doesn't like the extern declarations but there isn't a header file :-().

I also suspect that more explict commands such as:

moncontrol on/off
monstartup [ <start> <end> ]

would be better. The person using this feature will need to know how it is implemented anyway.

(Did Jason Molenda, have something to do with the original patch?)

Andrew



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