This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: Questions about tracing static function and statement probe


Hi -

On Tue, Jul 17, 2007 at 09:49:54AM +0800, sunzen w. wrote:
> [...]
> Naturally get_transaction is not an inline function. It seems that it
> has been converted to inline function by Gcc. Is there a way to
> disable the automatic conversion?

You might try adding "-fno-inline-functions-called-once" to the CFLAGS.

> [...]  But as the second problem i described, statement probe also
> doesn't work. Do I miss some thing?

The placement of statement probes is tricky.  If you have

FILE.c:
1: function foo (arg1) { /* inlined */ }
2: 
3: function bar () {
4:   expr=zoo
5:   foo (expr)
6:   baz (expr)
7: }

You would prefer to put in a 
   probe XXX.function("foo") {$arg1}
but may have to do instead
   probe XXX.statement("*@FILE.c:5") {$expr}

- FChE

Attachment: pgp00000.pgp
Description: PGP signature


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