Hey Remek,
Thanks for working me offline to gather the data I needed to understand
this issue. You're hitting a rather interesting issue in that this function
(log_vwrite) contains both a jump table (something that puts the pid
provider's return site detection code into a very conservative mode) and
tail-calls (relatively rare in 32-bit x86. In particular, check out this
sequence:
_Z10log_vwriteiPKcPc+0xb2: popl %ebx
_Z10log_vwriteiPKcPc+0xb3: popl %esi
_Z10log_vwriteiPKcPc+0xb4: popl %edi
_Z10log_vwriteiPKcPc+0xb5: leave
_Z10log_vwriteiPKcPc+0xb6: jmp -0xef06 <fatal>
Normally, we'd detect this as a return site, but the presence of the jump
table elswhere in the function has put us into a case where we don't detect
that specific instruction sequence. We should add that code sequence to our
short list.
I've filed the following bug for you:
6762246 when jump tables fight tail-calls no one wins
Adam
On Mon, Oct 20, 2008 at 05:33:03PM +0200, P. Remek wrote:
> Hi,
>
> I am using pid provider and I have noticed that return probe is not fired when
> leaving function with variable number of arguments using va_start and va_stop.
> Having such code:
>
> log() {
> va_start(ap, fmt);
> log_vwrite(l, fmt, ap);
> va_end(ap);
> }
>
> I get such output from dtrace:
>
> -> log
> -> log_vwrite
> <- log
>
>
> Is this a dtrace problem or is there some general problem why it can't work
> when using variable argument lists?
>
> Thanks,
> Remek
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]
--
Adam Leventhal, Fishworks http://blogs.sun.com/ahl
_______________________________________________
dtrace-discuss mailing list
[email protected]