GDB fast tracepoint query

Luis Machado
Mon Apr 29 20:07:00 GMT 2013


On 04/29/2013 09:27 PM, Suchakrapani Datt Sharma wrote:
> Hi,
> I am trying to do some performance analysis of various dynamic
> instrumentation/tracing tools. I started with simple overhead analysis of my
> 'dummy' test program when traced with fast tracepoints using gdb. If I do not
> provide 'actions' after setting a tracepoint, will gdb still pass through the
> tracepoint and induce some overhead or its just the same as *not* setting the
> fast tracepoint and running a clean test? Is the first instruction at the
> tracepoint on foo() modified immediately upon setting the tracepoint using
> 'ftrace foo'?

AFAIU, the fast tracepoint jump pad will always be there if a trace 
experiment is running (with at least one active fast tracepoint set), 
which means GDB will take the path through the fast tracepoint's jump 
pad, save whatever needs to be saved, execute actions and then exit 
through the jump pad again. So there should be some small overhead there 
even if no actions are actually executed.

As for the time when the instruction is modified, it is during the trace 
experiment startup, during "tstart". "ftrace" or "trace" will just 
register the tracepoint internally inside gdb.


More information about the Gdb mailing list