Enabling DTrace on FreeBSD 14.3

Hello :)

I am trying to use a tool that uses DTrace to profile a Rust program.
The tool is cargo flamegraph

and the program being profiled is the Helix editor

although I'm not sure if that's relevant.
When I run either the profiling tool cargo flamegraph or just the `dtrace ` cli tool, I get the error:

dtrace: failed to initialize dtrace: DTrace device not available on system

I looked at the handbook for how to fix this

but it just says that it should be built into the GENERIC kernel for FreeBSD 9.2 and 10.0, and I presume, later versions. I'm on 14.3-RELEASE, does that version have DTrace built in?
How can I find out?

If not it seems the solution is make a custom config file and recompile the kernel with it?
 
Thanks for the replies, I did
sudo kdload dtrace followed by
sudo dtrace -l, and it seems to be working.

It seems
sudo kldload dtrace fixed the issue, thank you ^_^
 
Back
Top