This is the mail archive of the gdb@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: Profiling gdb?


> 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


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