1 { lib, stdenv, buildPackages
3 , libbfd, popt, zlib, linuxHeaders, libiberty_static
6 stdenv.mkDerivation rec {
11 url = "mirror://sourceforge/oprofile/${pname}-${version}.tar.gz";
12 sha256 = "04m46ni0ryk4sqmzd6mahwzp7iwhwqzfbmfi42fki261sycnz83v";
16 substituteInPlace opjitconv/opjitconv.c \
17 --replace "/bin/rm" "${buildPackages.coreutils}/bin/rm" \
18 --replace "/bin/cp" "${buildPackages.coreutils}/bin/cp"
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ];
25 "--with-kernel=${linuxHeaders}"
26 "--disable-shared" # needed because only the static libbfd is available
30 description = "System-wide profiler for Linux";
32 OProfile is a system-wide profiler for Linux systems, capable of
33 profiling all running code at low overhead. It consists of a
34 kernel driver and a daemon for collecting sample data, and
35 several post-profiling tools for turning data into information.
37 OProfile leverages the hardware performance counters of the CPU
38 to enable profiling of a wide variety of interesting statistics,
39 which can also be used for basic time-spent profiling. All code
40 is profiled: hardware and software interrupt handlers, kernel
41 modules, the kernel, shared libraries, and applications.
43 license = lib.licenses.gpl2;
44 homepage = "http://oprofile.sourceforge.net/";
46 platforms = lib.platforms.linux;