Skip to content

Conversation

@mlechu
Copy link
Member

@mlechu mlechu commented Jan 2, 2026

Our USDT provider and JL_PROBE_* infrastructure, which appears to be written for bpftrace, is also usable with macOS dtrace as long as we work around a known dtrace bug that many others have worked around in the same silly way.

We can't reuse the actual probe definitions in contrib/bpftrace, but those can be tweaked to work, e.g. https://gist.github.com/mlechu/8b4fd0125ca1b0b87be802f4ba03a5b4 (run with sudo dtrace -s ./rt_gc.d -p $(pgrep -n julia); no need to disable SIP for these)

@mlechu mlechu requested a review from vchuravy January 2, 2026 22:38
@vchuravy
Copy link
Member

vchuravy commented Jan 3, 2026

Could you add a comment to these struct definitions? And perhaps add your adjusted drace script to contrib?

I am not at my laptop right now, but I think there is also a documentation section about using bpftrace.

mlechu added 3 commits January 5, 2026 14:51
Our USDT provider and `JL_PROBE_*` infrastructure, which appears to be written
     for bpftrace, is also usable with macOS dtrace as long as we work around a
     [known dtrace
     bug](https://www.davepacheco.net/blog/2009/anatomy-of-a-dtrace-usdt-provider/#rough-edges)
     that many others have worked around in the [same silly
     way](https://github.com/search?q=language%3ADTrace+%22dummy%22&type=code).

We can't reuse the actual probe definitions in `contrib/bpftrace`, but those can
     be tweaked to work, e.g.
      https://gist.github.com/mlechu/8b4fd0125ca1b0b87be802f4ba03a5b4 (run with
     `dtrace -s ./rt_gc.d -p $(pgrep -n julia)`)
@vchuravy
Copy link
Member

vchuravy commented Jan 6, 2026

And the docs I was thinking about are here https://docs.julialang.org/en/v1/devdocs/probes/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants