Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a DTrace implementation for Mac/illumos/freebsd/etc. #3

Open
cuviper opened this issue Jul 9, 2014 · 4 comments
Open

Add a DTrace implementation for Mac/illumos/freebsd/etc. #3

cuviper opened this issue Jul 9, 2014 · 4 comments

Comments

@cuviper
Copy link
Owner

cuviper commented Jul 9, 2014

As per rust-lang/rust#6816, DTrace USDT and/or libusdt are plausible backends for probe!.

@cuviper
Copy link
Owner Author

cuviper commented Dec 4, 2014

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.

https://sourceware.org/ml/gdb/2014-10/msg00108.html

@No9
Copy link

No9 commented Jan 14, 2015

Also of interest in this space https://gist.github.com/bcantrill/b7d031db6e35cfd79201

@cuviper
Copy link
Owner Author

cuviper commented Jan 14, 2015

@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.

@cuviper cuviper changed the title Add a DTrace implementation for Mac Add a DTrace implementation for Mac/illumos/freebsd/etc. Jan 14, 2015
@cuviper
Copy link
Owner Author

cuviper commented Jan 14, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants