Stripping perf out from kernel source

You may have heard about perf, a tool made by Linux kernel developers to help debugging, benchmarking and profiling.

The problem is you have to download the whole kernel source in order to compile perf. If you are not used to follow kernel developping, most likely you will not have its source. But it’s still possible to compile perf.

As I’m helping to maintain perf package in Archlinux, I made the following script to strip perf from a given kernel version:


function usage() {
    cat - <
This script works fine with latest 2.6.33 kernel. Regularly I'm uploading to this site the stripped version of perf. The latest one, you find here.