-
Notifications
You must be signed in to change notification settings - Fork 1
Using dtrace with erlang on FreeBSD 10.0
-
Before making, first we have to load dtrace:
kldload dtraceall
And add it to loader.conf so that it is loaded automatically after reboots:
cat >> /boot/loader.conf
- Install gcc (Using pkgng for gcc will save you some time, but it can be installed from the port tree too. Simply skip this step to let gcc be installed from the port tree as one of the dependencies of Erlang).
pkg install gcc dialog4ports
- Now go to the port tree:
$ cd /usr/ports/lang/erlang
and configure erlang:
$ sudo make config
Select dtrace and gcc (it will save you some compilation time if you install gcc from pkgng separately
- Now make and install
$ sudo make
$ sudo make install
- Start erlang:
% erl
WARNING: number of probes fixed does not match the number of defined probes (1004 != 1098, respectively)
WARNING: some probes might not fire or your program might crash
Erlang R16B02 (erts-5.10.3) [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false] [dtrace]
Eshell V5.10.3 (abort with ^G)
1>
We see that it has dtrace as one of the options written in the list.
- List the dtrace probes for erlang and make sure they are enabled:
# dtrace -l | grep erlang | wc -l