[cfe-dev] RFC: Syringe -- A Dynamic Behavior Injection Framework

David Chisnall via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 7 04:43:41 PDT 2018


On 6 Sep 2018, at 23:01, Paul Kirth via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Instrumenting call sites was also something we considered, but ultimately decided against. There is an interesting trade-off between instrumenting the function definition and its call sites. in the end, we felt modifying the function itself made the most sense, and allowed us to only modify targeted portions of the code. That said, there are some compelling use cases that arise should we wish to enable a per call site type of behavior injection, where the behavior at each call site could be modified independently. This of course makes the overall system more complex, but presents some interesting opportunities to consider moving forward.

Note that the LOOM Framework (https://github.com/cadets/loom) provides both call site and callee instrumentation and lets you expose these things to arbitrary instrumentation functions, described by a YAML file.  This code is a more generic and reusable version of the TESLA (temporal assertion) framework form 2014.

If we’re considering importing something less generic, then it may be worth thinking about whether upstreaming LOOM is worthwhile (it wasn’t upstreamed already because there was no publicly expressed desire from the wider community to have such a thing in mainline LLVM).

David



More information about the cfe-dev mailing list