Posted Oct 28, 2010 13:09 UTC (Thu) by i3839 (guest, #31386)
In reply to: Jump label by ptman
Parent article: Jump label
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.
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!