Tracing in rust


#1

I’m interested in making rust able to instrument my apps via usdt on Linux.
There is project to do this [1], I’ve got working demo [2] utilizing it and that looks extremely useful.
Currently it works as a macro, and has some annoying limitations:

  • It doesn’t understand argument types (I believe macros can’t do that).
  • It uses asm! to insert probes, and that doesn’t work on stable.

I’d like to push this forward and I’d like to get some input of how I should proceed:

  1. Are there any plans to stabilize asm, so that I could get it working on stable
    (I have no intention of using nightly in production)?
  2. I believe argument types can be retrieved if it was compiler plugin. Am I right?
  3. Would there be an interest in making it a language feature? I believe it would be extremely useful,
    relatively easy to achieve, and once done, not require much maintenance.

[1] libprobe https://github.com/cuviper/rust-libprobe
[2] using libprobe https://github.com/Fiedzia/rust-bpf-test
[3] Relevant rust rfc issue https://github.com/rust-lang/rfcs/issues/875


#2

Since you also posted to internals, here’s a cross-reference: