Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use profiling tools in linux. I see some information say Oprofile is not support in Ubuntu 12.04 and the alternate is perf. So I try to install perf.

I installed linux-tools-common, linux-base and linux-tools.

Then I type perf in the terminal and it returns:

perf not found for kernel 3.12.6
You may need to install linux-tools-3.12.6-3.12.6

But I could not install either linux-tools-3.12.6-3.12.6 (I think it's a wrong name) or linux-tools-3.12.6.

Is it a wrong way to install and use perf in that way, or is it the kernel problem(the kernel is compiled by myself)?

share|improve this question
You appear to have installed a custom kernel. 3.12 is not in Ubuntu official repositories. This means you'll have to install the tools yourself or to revert the custom kernel installation. Please provide more information on your custom kernel (how did you install it?) Please edit your question when doing so. – gertvdijk Dec 24 '13 at 16:20
Thank you for the reply! I updated the building steps. I think I just upgraded the kernel without changing the basic ubuntu settings. – user2002993 Dec 26 '13 at 1:49
I am sorry, Braiam. I don't understand your meaning. I don't have any answer of installing perf on custom kernel. I edit my question to add the information of how I building my custom kernel due to gertvdijk asking. You mean I should add the information below the answer section? But what do you mean by editing my question? – user2002993 Dec 30 '13 at 2:49
up vote 2 down vote accepted

You may need to build the tools since you are using a custom kernel. If you want to use linux tools from the repositories, you need to use the kernel provided by Ubuntu. Linux tools checks your kernel version and if it don't match it's own it will not run.

share|improve this answer
I see! I try to use perf in my original ubuntu kernel and it works. So isn't there any way to use perf in custom kernel? – user2002993 Dec 26 '13 at 2:05
@user2002993 compile it yourself. – Braiam Mar 16 '14 at 17:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.