This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Profiling gdb?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 20 Jan 2002 22:26:35 -0500
- Subject: Re: Profiling gdb?
- References: <20020120210343.A22638@nevyn.them.org>
> What was the final status of the profiling patch? It's a feature I'd
> really like to see in (having it in means fewer local changes in my
> tree when I'm testing the speed of something!).
Interesting timing, I was just looking over the same thing.
My take is:
Part 1: ``(gdb) maint set moncontrol {on,off}''
A home for the command doco (gdb.texinfo) has been created.
The necessary framework (maint set) has been added along with the
function to correctly implement a boolean command. Note:
http://sources.redhat.com/gdb/ari/#var_boolean
The command should always be present but the call should be wrapped in a
check that the function exits. The function moncontrol() is in both the
libc and libc_p libraries (at least on correctly implemented systems :-)
so this is correct.
Part 2: Add the --<what-was-that-profile-option>
Which adds the compile/link -gp flag.
Eli's comment that you don't need to link with -gp is correct.
Perhaphs the <what-was-that-profile-option> should let the user control
the compile and link flags.
Don't remember where the doco for this goes.
Part 3: (new) ``(gdb) maint set monstartup <lowpc> <highpc>
Can anyone think why we shouldn't make this visible. Of course the user
will need to somehow obtain the magic addresses from somewhere.
Same as moncontrol().
Andrew