Changes between Version 2 and Version 3 of Debugging/LowLevelProfiling/Perf


Ignore:
Timestamp:
Apr 19, 2011 10:51:18 AM (3 years ago)
Author:
tibbe
Comment:

Add instruction for installing on Ubuntu

Legend:

Unmodified
Added
Removed
Modified
  • Debugging/LowLevelProfiling/Perf

    v2 v3  
    33Since Linux 2.6.31, linux has had a new performance counter subsystem (initially called "perf counters" and later renamed to "perf events").  The facilities provided by perf events, and the associated tool "perf", are generally a superset of what you can do with [wiki:Debugging/LowLevelProfiling/oprofile oprofile] and [wiki:Debugging/LowLevelProfiling qprof], so it's a good idea to use perf if you can.  It does support fewer processors than the other systems, although more are being added over time. 
    44 
    5 The perf events subsystem is compiled in by default in the kernel shipped with most distros (e.g. Ubuntu) which means there's no fiddling around compiling your own kernel or modules.  However, the "perf" tool needs to be compiled separately - at the time of writing it isn't available in the Ubuntu repositories or anywhere else as a `.deb` that I could find.  But it's straightforward to compile it up: 
     5The perf events subsystem is compiled in by default in the kernel shipped with most distros (e.g. Ubuntu) which means there's no fiddling around compiling your own kernel or modules.  On Debian and Ubuntu you can install "perf" by installing the `linux-tools-<kernel version>` package: 
     6 
     7    sudo apt-get install linux-tools-<kernel version> 
     8 
     9If your distro doesn't include "perf" as a package you can build it manually like so: 
    610 
    711 * `apt-get install binutils-dev libdwarf-dev libelf-dev` (or equivalent on your distro)