Add Sysprof, a system-wide profiler for Linux.
svn path=/nixpkgs/trunk/; revision=12008
This commit is contained in:
parent
7478e316b7
commit
ff704a0102
|
@ -0,0 +1,17 @@
|
|||
--- sysprof-1.0.10/configure 2008-04-28 01:41:25.000000000 +0200
|
||||
+++ sysprof-1.0.10/configure 2008-06-07 15:40:07.000000000 +0200
|
||||
@@ -3342,14 +3342,6 @@ if test $kernel_module = "yes"; then
|
||||
echo \*
|
||||
exit 1
|
||||
fi
|
||||
-
|
||||
- if ! test -f /lib/modules/`uname -r`/build/Makefile ; then
|
||||
- echo \*
|
||||
- echo \* Sysprof requires the kernel source code to be installed.
|
||||
- echo \* On a Fedora Core system the relevant package is kernel-devel
|
||||
- echo \*
|
||||
- exit 1
|
||||
- fi
|
||||
fi
|
||||
|
||||
# Pkgconfig dependencies
|
|
@ -0,0 +1,47 @@
|
|||
{ fetchurl, stdenv, kernel, binutils
|
||||
, pkgconfig, gtk, glib, pango, libglade }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sysprof-1.0.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.daimi.au.dk/~sandmann/sysprof/${name}.tar.gz";
|
||||
sha256 = "1cdjnymd9nz72vcw6j0bbhb2ka19rjqd3scgx810a4m3qcai7irs";
|
||||
};
|
||||
|
||||
buildInputs = [ binutils pkgconfig gtk glib pango libglade ];
|
||||
|
||||
patches = [ ./configure.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
kernelVersion=$(cd "${kernel}/lib/modules" && echo *)
|
||||
echo "assuming Linux kernel version \`$kernelVersion'"
|
||||
|
||||
sed -i "module/Makefile" \
|
||||
-e"s|^[[:blank:]]*KDIR[[:blank:]]*:=.*$|KDIR := ${kernel}/lib/modules/$kernelVersion/build|g ;
|
||||
s|\$(KMAKE) modules_install|install sysprof-module.ko $out/share/sysprof/module|g ;
|
||||
s|\\[ -e /sbin/depmod.*$|true|g"
|
||||
|
||||
# XXX: We won't run `depmod' after installing the module.
|
||||
'';
|
||||
|
||||
configureFlags = "--enable-kernel-module";
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p "$out/share/sysprof/module"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.daimi.au.dk/~sandmann/sysprof/;
|
||||
description = "Sysprof, a system-wide profiler for Linux";
|
||||
license = "GPLv2+";
|
||||
|
||||
longDescription = ''
|
||||
Sysprof is a sampling CPU profiler for Linux that uses a kernel
|
||||
module to profile the entire system, not just a single
|
||||
application. Sysprof handles shared libraries and applications
|
||||
do not need to be recompiled. In fact they don't even have to
|
||||
be restarted.
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -2246,6 +2246,12 @@ let pkgs = rec {
|
|||
javaSupport = true;
|
||||
}));
|
||||
|
||||
sysprof = import ../development/tools/profiling/sysprof {
|
||||
kernel = kernel_2_6_23; # FIXME: Allow the choice of a kernel
|
||||
inherit fetchurl stdenv binutils pkgconfig;
|
||||
inherit (gnome) gtk glib pango libglade;
|
||||
};
|
||||
|
||||
texinfo49 = import ../development/tools/misc/texinfo/4.9.nix {
|
||||
inherit fetchurl stdenv ncurses;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue