User: Password:
|
|
Subscribe / Log in / New account

Jump label

Jump label

Posted Oct 28, 2010 7:54 UTC (Thu) by ptman (subscriber, #57271)
Parent article: Jump label

Is this comparable to dtrace in Solaris? Zero overhead when probes are disabled?


(Log in to post comments)

Jump label

Posted Oct 28, 2010 13:09 UTC (Thu) by i3839 (guest, #31386) [Link]

There is no such thing as zero overhead. In the best case you still waste a little bit of memory per tracepoint, which all adds up to something significant if you have too many of them.

Jump label

Posted Nov 1, 2010 20:58 UTC (Mon) by ThomasBellman (subscriber, #67902) [Link]

Instead of inserting a NOP instruction, you could fill that slot with a useful instruction. Then, of course, that useful instruction must also be part of the tracepoint code, in order to have it performed when the tracepoint is enabled as well, when the original instruction is replaced with a jump.

Jump label

Posted Nov 2, 2010 20:28 UTC (Tue) by i3839 (guest, #31386) [Link]

That's very smart, but a bit tricky to implement (at least on x86 and other archs with variable instruction lengths). I'd say go for it!

Jump label

Posted Oct 30, 2010 3:50 UTC (Sat) by compudj (subscriber, #43335) [Link]

The overhead can be expected to be even lower than the static DTrace instrumentation, because jump labels, in combination with Tracepoints, branch over the whole stack setup and function call. DTrace only nops out the actual function call with a special linker phase, leaving in place the whole stack setup.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds