[dtrace-discuss] fbt:ip:tcp_xchg:entry does not exists

Adam Leventhal ahl at eng.sun.com
Wed Jan 17 01:45:16 PST 2007


I had Przemol give me the disassembly for tcp_xchg:

tcp_xchg:                       movl   %edx,%r8d
tcp_xchg+3:                     jmp    +0x13    <tcp_xchg+0x16>
tcp_xchg+5:                     movslq %r8d,%rax
tcp_xchg+8:                     movzbl (%rax,%rdi),%ecx
tcp_xchg+0xc:                   movzbl (%rax,%rsi),%edx
tcp_xchg+0x10:                  movb   %dl,(%rax,%rdi)
tcp_xchg+0x13:                  movb   %cl,(%rax,%rsi)
tcp_xchg+0x16:                  movl   %r8d,%eax
tcp_xchg+0x19:                  decl   %r8d
tcp_xchg+0x1c:                  testl  %eax,%eax
tcp_xchg+0x1e:                  jg     -0x19    <tcp_xchg+5>
tcp_xchg+0x20:                  repz ret

The problem is that DTrace won't instrument a leaf routine (one that doesn't
explicitly push a stack frame) on x86 and amd64. Leaf routines can often
indicate that we're operating in a delicate context whereas functions that
push stack frames are known to be safe. On SPARC, we use the trick of checking
for CTF data to see if a function was compiled from C code (and therefore
able to execute in unconstrained contexts); perhaps it's time to move this
trick to amd64 since the compiler seems to be increasingly aggressive about
optimizing out those stack frames.

I've filed this bug to track the issue:

    6513936 fbt can't instrumeent C-derived leaf routines on amd64

- ahl

On Tue, Jan 16, 2007 at 12:31:30PM +0100, przemolicc at poczta.fm wrote:
> On Tue, Jan 16, 2007 at 02:43:35AM -0800, Adam Leventhal wrote:
> > This is sounding like a bug. What does this command yeild on the two
> > systems:
> > 
> > # echo tcp_xchg::nm | mdb -k
> 
> On e2 (the server without the probe):
> bash-3.00# echo tcp_xchg::nm | mdb -k
> Value              Size               Type  Bind  Other Shndx    Name
> 0xfffffffff000dfe0|0x0000000000000022|FUNC |LOCL |0x0  |2       |tcp_xchg
> 
> On bolek (the server with the probe):
> bash-3.00# echo tcp_xchg::nm | mdb -k
> Value      Size       Type  Bind  Other Shndx    Name
> 0xf9e474a6|0x00000034|FUNC |LOCL |0x0  |1       |tcp_xchg
> 
> Regards
> przemol
> 
> ----------------------------------------------------------------------
> Slodkie jest zycie bandziora. Zobacz >> http://link.interia.pl/f19e5
> 
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl


More information about the dtrace-discuss mailing list