I'm trying to run perf on my Ubuntu Precise box, which I recently upgraded to kernel 3.11.10-03111002 (manual install). The problem is that perf and kernel versions must match, and the requested version is not available in the repositories (linux-tools-VERSION package). I can only install up to v3.8.0.

What can I do? Kernel upgrade/downgrade is an option, but I'd rather get the correct perf version.

  • Get the sources of your 3.11.10-03111002 kernel
  • Jump to it cd ./linux-3.11.10-03111002/tools/perf
  • Type make and hit enter.

To run, type ./perf

that's it.

For other options type make help

  • do you know where I could find the source for this kernel version? Googling for it only returns this page. – iomartin Feb 14 '14 at 12:52
  • You can use also the vanilla kernel from www.kernel.org. BTW: It mustn't be the same kernel version. AFAIS it is sufficient to have the same patch level. – user55518 Feb 14 '14 at 13:04
  • It's ever easy with Linux :-( – Soonts Nov 8 '17 at 18:29
  • Need dependencies. Solution: sudo apt-get -y install flex bison libdwarf-dev libelf-dev libpython-dev libunwind-dev util/PERF-VERSION-GEN: Syntax error: "elif" unexpected (expecting "then") Solution: git reset --hard from another OS. util/event.c:448:2: error: ‘readdir_r’ is deprecated Solution: ??? – Soonts Nov 8 '17 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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