Re: GDB fast tracepoint query

Luis Machado <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi,

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.

Luis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.