[llvm-dev] [XRay] RFC: LLVM-side Changes for nop-sleds

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 4 01:27:45 PDT 2016


On 4 Jul 2016, at 06:50, Dean Michael Berris via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> We've looked at the following alternatives, and we're looking to the community for feedback on both the current implementation and these alternatives.

I don’t think that I’ve yet seen an explanation of why you need the NOPs.  DTrace stopped using them a long time ago, for two reasons:

1) The increased code size caused a noticeable increase in i-cache misses, even when instrumentation was not actively being used.  This caused a noticeable probe effect (macroscopic observable performance artefacts even when no probes are active) and caused a lot of push-back in adoption.

2) On all of the architectures where we support DTrace (currently, I believe, x86, x86-64, AArch32, AArch64, MIPS64, and RISC-V) it’s possible to do the same thing by moving one of the instructions in the function prolog into the generated trampoline for the instrumentation.

I could understand wanting something more like patchpoints if you want to be able to instrument in the middle of a function (along the lines of TESLA or CSI), but if you’re just tracing function entry and exit then it doesn’t seem like the best solution.

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160704/36eaa8b9/attachment.bin>


More information about the llvm-dev mailing list