Arch Linux and Systemtap

by iamedu

EDIT: In my post I wrote a bit about utrace, and that I didn’t know who wrote it. MOST OF THE CREDIT GOES TO HIM, he wrote the utrace code and made systemtap available on userland, THANKS A LOT TO Roland McGrath (and thanks a lot to Frank Ch. Eigler for pointing out who wrote it).

I have been very curious about systemtap and DTrace lately, I think I could be much more productive and find performance issues much easier if I knew how to use those two things.

I have been an Arch Linux user for about two months now, and there’s a systemtap package in the AUR so I figured I’d give it a try.

After some playing with it I decided I needed some things in my kernel:

  • buildinfo
  • kprobes
  • utrace

There are the linux-fedora and kernel26-debug packages in the AUR that support that, but I am a big fan of Con Kolivas, Paolo, Graysky… and the linux-ck kernel, so I decided I should patch that kernel with utrace support.

So I took the sources from https://github.com/utrace/linux/tree/utrace-3.2, created a patch from the mainline 3.2 kernel and modified Graysky’s linux-ck package (I asked for permission first :D ) and voila! we have the linux-ck-systemtap kernel in the aur.

It seems to be at least working.. I also installed the openjdk with systemtap support and I can test those fancy tricks the systemtap people advertize on their page.

So please, if you wanna try test it just a word of advice….

  • Don’t build it in your /tmp partition, debug info can make your build directory grow too big (use –tmp flag with yaourt)
  • Try to use localmodcfg, or your kernel (specially the fallback image might not fit in your /boot partition)
  • THIS HAS NOT YET BEEN TESTED ON A 32 BIT LINUX, I am planning to install a virtual machine later to test, if you want to give it a try, be my guest, just don’t say I didn’t warn you.

I will probably be uploading a package for the modified openjdk someday but for now I hope someone finds a good use to this…

The link is…

http://aur.archlinux.org/packages.php?ID=56037

Have FUN!

EDIT

If you want to clone the repo (most of it is graysky’s work) take a look at the git repo https://github.com/iamedu/linux-ck-systemtap