I forward ported my DTrace probes for the FreeBSD linuxulator from a 2008-current to a recent -current. I have not the complete FreeBSD linuxulator covered, but a big part is already done. I can check the major locks in the linuxulator, trace futexes, and I have a D-script which yells at a lot of errors which could happen but should not.
Some of my D-scripts need some changes, as real-world testing showed that they are not really working as expected. They can get overwhelmed by the amount of speculation and dynamic variables (error message: dynamic variable drops with non-empty dirty list). For the dynamic variables problem I found a discussion on the net with some suggestions. For the speculation part I expect similar tuning-possibilities.
Unfortunately the D-script which checks the internal locks fails to compile. Seems there is a little misunderstanding on my side how the D-language is supposed to work.
I try to get some time later to have a look at those problems.
During my development I stumbled over some generic DTrace problems with the SDT provider I use for my probes:
- If you load the Linux module after the SDT module, your system will panic as soon as you want to access some probes, e.g. “dtrace -l” will panic the system. Loading the Linux module before the SDT module prevents the panic.
- Unloading the SDT module while the Linux module with the SDT probes is still loaded panics the system too. Do not unload the Linux module if you run with my patch.
According to avg@ those are known problems, but I think nobody is working on this. This is bad, because this means I can not commit my current patchset.
If someone wants to try the new DTrace probes for the linuxulator, feel free to go to http://www.Leidinger.net/FreeBSD/current-patches/ and download linuxulator-dtrace.diff. I do not offer a working hyperlink here on purpose, the SDT bugs can hurt if you are not careful, and I want to make the use of this patch a strong opt-in because of this. If the patch hurts you, it is your fault, you have been warned.