Open cuviper opened 10 years ago
There is a DTrace USDT patch set for GDB, which includes a pdtrace
script to emulate what the normal proprietary dtrace
script does. That may be a good clue for how to emulate USDT in probe!
too. The script makes ELF files for DTrace on Oracle Linux though, so I don't know how much info is applicable to Mach-O on OS X.
Also of interest in this space https://gist.github.com/bcantrill/b7d031db6e35cfd79201
@No9 - ah, that's using the regular function provider. FWIW, SystemTap can do that too, using debuginfo and/or symbol tables, like stap para-callgraph.stp 'process.function("*")' -c ./hello
. [1]
I will edit the title though, to reflect that a DTrace implementation is not just for Mac. @bcantrill if you happen to see this, I'd welcome your expertise to make probe!
work for DTrace.
It's also tricky that he's using Linux binaries, so the target_os
conditional won't be enough for libprobe to build a DTrace USDT flavor. Maybe it needs an additional cfg variable, or just wait for a native port.
As per rust-lang/rust#6816, DTrace USDT and/or libusdt are plausible backends for
probe!
.