Sometimes a user wants to instrument just a certain module. Currently, the only approach to do so is to use runtime filtering.
However, it might be worth silencing the instrumenter after the interesting module is left. The instrumenter could use a stack counter to evaluate if the interesting module is reached again and start forwarding events again.
Questions:
- How would we identify a module? String compares are expensive.
- How is the runtime impact? Would it decrease significantly?
- Are threads an Issue? Maybe TLS will help?