lttng-tools: new package
This is the Linux Trace Toolkit. Included in this package: Command-line client: lttng Tracing daemons: lttng-sessiond (automatically started by lttng) lttng-relayd (remote trace collection daemon) Userspace tracing can be done by using liblttng-ust. To do kernel tracing we also need the LTTng kernel modules. I've added a patch that changes "/sbin/modprobe" to just "modprobe".
This commit is contained in:
parent
33d78777a3
commit
6a4f068b9e
23
pkgs/development/tools/misc/lttng-tools/default.nix
Normal file
23
pkgs/development/tools/misc/lttng-tools/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ stdenv, fetchurl, popt, libuuid, liburcu, lttngUst }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "lttng-tools-2.2.3";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://lttng.org/files/lttng-tools/${name}.tar.bz2";
|
||||||
|
sha256 = "1p16n42j34xkaj17zg2g12rzkfwpdv9ay1h4bkdq6038v320mljv";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ popt libuuid liburcu lttngUst ];
|
||||||
|
|
||||||
|
patches = [ ./lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Tracing tools (kernel + user space) for Linux";
|
||||||
|
homepage = http://lttng.org/;
|
||||||
|
license = licenses.lgpl21;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.bjornfor ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
From daba2e936571a236817022b760d91c48b730c30b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
|
||||||
|
Date: Tue, 9 Jul 2013 23:47:47 +0200
|
||||||
|
Subject: [PATCH] Change modprobe path from "/sbin/modprobe" to "modprobe"
|
||||||
|
(rely on PATH lookup)
|
||||||
|
|
||||||
|
---
|
||||||
|
src/bin/lttng-sessiond/modprobe.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c
|
||||||
|
index 7e06dad..4075efe 100644
|
||||||
|
--- a/src/bin/lttng-sessiond/modprobe.c
|
||||||
|
+++ b/src/bin/lttng-sessiond/modprobe.c
|
||||||
|
@@ -90,7 +90,7 @@ void modprobe_remove_lttng_control(void)
|
||||||
|
|
||||||
|
for (i = ARRAY_SIZE(kern_modules_control) - 1; i >= 0; i--) {
|
||||||
|
ret = snprintf(modprobe, sizeof(modprobe),
|
||||||
|
- "/sbin/modprobe -r -q %s",
|
||||||
|
+ "modprobe -r -q %s",
|
||||||
|
kern_modules_control[i].name);
|
||||||
|
if (ret < 0) {
|
||||||
|
PERROR("snprintf modprobe -r");
|
||||||
|
@@ -125,7 +125,7 @@ void modprobe_remove_lttng_data(void)
|
||||||
|
|
||||||
|
for (i = ARRAY_SIZE(kern_modules_list) - 1; i >= 0; i--) {
|
||||||
|
ret = snprintf(modprobe, sizeof(modprobe),
|
||||||
|
- "/sbin/modprobe -r -q %s",
|
||||||
|
+ "modprobe -r -q %s",
|
||||||
|
kern_modules_list[i].name);
|
||||||
|
if (ret < 0) {
|
||||||
|
PERROR("snprintf modprobe -r");
|
||||||
|
@@ -169,7 +169,7 @@ int modprobe_lttng_control(void)
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(kern_modules_control); i++) {
|
||||||
|
ret = snprintf(modprobe, sizeof(modprobe),
|
||||||
|
- "/sbin/modprobe %s%s",
|
||||||
|
+ "modprobe %s%s",
|
||||||
|
kern_modules_control[i].required ? "" : "-q ",
|
||||||
|
kern_modules_control[i].name);
|
||||||
|
if (ret < 0) {
|
||||||
|
@@ -205,7 +205,7 @@ int modprobe_lttng_data(void)
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(kern_modules_list); i++) {
|
||||||
|
ret = snprintf(modprobe, sizeof(modprobe),
|
||||||
|
- "/sbin/modprobe %s%s",
|
||||||
|
+ "modprobe %s%s",
|
||||||
|
kern_modules_list[i].required ? "" : "-q ",
|
||||||
|
kern_modules_list[i].name);
|
||||||
|
if (ret < 0) {
|
||||||
|
--
|
||||||
|
1.8.2.3
|
||||||
|
|
@ -3542,6 +3542,8 @@ let
|
|||||||
|
|
||||||
ltrace = callPackage ../development/tools/misc/ltrace { };
|
ltrace = callPackage ../development/tools/misc/ltrace { };
|
||||||
|
|
||||||
|
lttngTools = callPackage ../development/tools/misc/lttng-tools { };
|
||||||
|
|
||||||
lttngUst = callPackage ../development/tools/misc/lttng-ust { };
|
lttngUst = callPackage ../development/tools/misc/lttng-ust { };
|
||||||
|
|
||||||
mk = callPackage ../development/tools/build-managers/mk { };
|
mk = callPackage ../development/tools/build-managers/mk { };
|
||||||
|
Loading…
Reference in New Issue
Block a user