From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yFrrMsvsm2ESDwEAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 20:17:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EJaPLsvsm2G8EQAAB5/wlQ (envelope-from ) for ; Mon, 22 Nov 2021 19:17:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 466F52ECC5 for ; Mon, 22 Nov 2021 20:17:31 +0100 (CET) Received: from localhost ([::1]:39382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpEok-0003TG-FM for larch@yhetil.org; Mon, 22 Nov 2021 14:17:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpEoI-0003Ss-W1 for guix-patches@gnu.org; Mon, 22 Nov 2021 14:17:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpEoI-0005YU-NC for guix-patches@gnu.org; Mon, 22 Nov 2021 14:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpEoI-0007US-HM for guix-patches@gnu.org; Mon, 22 Nov 2021 14:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52043] [PATCH 2/2] gnu: Move instrumentation tools to instrumentation module. Resent-From: Olivier Dion Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Nov 2021 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52043 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52043@debbugs.gnu.org Cc: Olivier Dion Received: via spool by 52043-submit@debbugs.gnu.org id=B52043.163760859027269 (code B ref 52043); Mon, 22 Nov 2021 19:17:02 +0000 Received: (at 52043) by debbugs.gnu.org; 22 Nov 2021 19:16:30 +0000 Received: from localhost ([127.0.0.1]:49147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpEni-00072Q-I6 for submit@debbugs.gnu.org; Mon, 22 Nov 2021 14:16:30 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:44300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpEng-0006wY-Um for 52043@debbugs.gnu.org; Mon, 22 Nov 2021 14:16:25 -0500 Received: from laura.hitronhub.home (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1AMJG7Qx014523 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 22 Nov 2021 14:16:18 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1AMJG7Qx014523 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1637608578; bh=dhBrejJaH4/kjJBn5audxU6xYhX0xvAUhvGyalHGMBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=apSY2Nw7VWGnvbF6Y6qTR/7gDOfsIEwb3Pezmjlw4yiCL3UteDO/agDhVd/MSNWpT u2h6Wyi3kBbMA0Mq3zEK5WlE6hlJf6KnTuN68xR+v+fX1UCSKw3OQLMD3itn7Wn1wy vzlj29Mx6g8MYbYcArRyP6LoAYBfVGTWfffPvdqQ= Date: Mon, 22 Nov 2021 14:16:05 -0500 Message-Id: <36f687de44920f795476e5ae5af564afc30a425e.1637608343.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 In-Reply-To: <60c77ab6e2f5f098b1ecdc9c50c602072dbc2f68.1637608343.git.olivier.dion@polymtl.ca> References: <60c77ab6e2f5f098b1ecdc9c50c602072dbc2f68.1637608343.git.olivier.dion@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Mon, 22 Nov 2021 19:16:07 +0000 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Olivier Dion X-ACL-Warn: , Olivier Dion via Guix-patches From: Olivier Dion via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637608651; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dhBrejJaH4/kjJBn5audxU6xYhX0xvAUhvGyalHGMBM=; b=XssPM+ShEoC2y22sVPOU3mlUnwYa/3fikLV54qpfyXuIIexIplg660+soRs/7WSPtpXalP CysRVc6pnq6/ZzSI8TYNOWPVcTNclk0QQO/qK76hYbTX8zefw9U4wgj6NAV4E0dXgspD3Y aK5BENynTBganX13StG0qWboYhVeONGR1DntZlHmdI5ciWt0elUoI51IMAT2FUn8k1pTuT /2Sdl9XZynJ108DsiEtrslORXo8WuKj8tx71Hv4Fjc8usw4aUaGJnTgS6tEoYjwKP5aNJE vWICL6LlmEtTHmg7kVD/C+YOxh9ZfjVESONF1ZuSK6jpEnW+K6eGm+ZqX9l8QQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637608651; a=rsa-sha256; cv=none; b=dISlXm9AvCnR57ifLP1hDqa9yP7xFgdBSxn4BiMzd229HAbibX9SBHcdzw2JCRGbqQdf6V aNYO+CNoHbSnRlM9Nc4brwS9Gus3YmlJdXPUIajSGM86L51XYxu6VdVahzwRb/PONbi6cF 4RoxcoV2IrBE75v22zR5cEqIcUEaFHBF09KScANsbdXusz6tm6ADJ1sUHE1jGPQxDQ6B65 fR9DjduD11A4CrWpijM+6REP9IW4Rfj0Z3SV6EQFaO0uEpW2XnkV/Ir/S11aB43LlXHQkI E+Uy4mL/t5mZvVTOhVqHvQ7Ys1GP7+i7UUZhIcYXK5FJG+xI2zWJbhZnnpzONQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=apSY2Nw7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=apSY2Nw7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 466F52ECC5 X-Spam-Score: 0.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: TBJ3O1m1Wxo/ * gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ... * gnu/packages/instrumentation.scm: ... here. --- gnu/packages/instrumentation.scm | 162 +++++++++++++++++++++++++++++++ gnu/packages/linux.scm | 147 ---------------------------- 2 files changed, 162 insertions(+), 147 deletions(-) diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm index cacd74ac0a..b876551673 100644 --- a/gnu/packages/instrumentation.scm +++ b/gnu/packages/instrumentation.scm @@ -17,15 +17,86 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages instrumentation) + #:use-module (gnu packages perl) + #:use-module (gnu packages base) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages datastructures) + #:use-module (gnu packages documentation) #:use-module (gnu packages elf) + #:use-module (gnu packages flex) + #:use-module (gnu packages glib) + #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + #:use-module (gnu packages man) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages popt) + #:use-module (gnu packages python) + #:use-module (gnu packages sphinx) + #:use-module (gnu packages swig) #:use-module (gnu packages tbb) + #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:prefix license:)) +(define-public babeltrace + (package + (name "babeltrace") + (version "2.0.4") + (source (origin + (method url-fetch) + (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-" + version ".tar.bz2")) + (sha256 + (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp")))) + + (build-system gnu-build-system) + + (arguments + `(;; FIXME - When Python's bindings are enabled, tests do not pass. + #:configure-flags '("--enable-debug-info" + "--enable-man-pages" + "--disable-python-bindings" + "--disable-python-plugins") + #:phases + (modify-phases %standard-phases + ;; These are recommended in the project's README for a development + ;; build configuration. + (add-before 'configure 'set-environment-variables + (lambda _ + (setenv "BABELTRACE_DEV_MODE" "1") + (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE")))))) + (inputs + `(("glib" ,glib))) + ;; NOTE - elfutils is used for the LTTng debug information filter + ;; component class. This can be moved to `native-inputs` if + ;; `--enable-debug-info` is replaced by `--disable-debug-info` in + ;; `#:configure-flags`. + (propagated-inputs + `(("elfutils" ,elfutils))) + ;; NOTE - python-3 is set here for generating the bindings. Users need to + ;; install python-3 in their profile in order to use these bindings. + (native-inputs + `(("asciidoc" ,asciidoc) + ("bison" ,bison) + ("flex" ,flex) + ("pkg-config" ,pkg-config) + ("python-3" ,python-3) + ("python-sphinx" ,python-sphinx) + ("swig", swig) + ("xmltoman" ,xmltoman))) + (home-page "https://babeltrace.org/") + (synopsis "Trace manipulation toolkit") + (description "Babeltrace 2 is a framework for viewing, converting, +transforming, and analyzing traces. It is also the reference parser +implementation of the Common Trace Format (CTF), produced by tools such as +LTTng and barectf. This package provides a library with a C API, Python 3 +bindings, and the command-line tool @command{babeltrace2}.") + (license license:expat))) + (define-public dyninst (package (name "dyninst") @@ -54,3 +125,94 @@ (define-public dyninst (synopsis "Dynamic instrumentation") (description "Tools for binary instrumentation, analysis, and modification.") (license license:lgpl2.0))) + +(define-public lttng-ust + (package + (name "lttng-ust") + (version "2.13.0") + (source (origin + (method url-fetch) + (uri (string-append "https://lttng.org/files/lttng-ust/" + "lttng-ust-" version ".tar.bz2")) + (sha256 + (base32 + "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l")))) + (build-system gnu-build-system) + (inputs + `(("liburcu" ,liburcu) + ("numactl" ,numactl))) + (native-inputs + `(("python" ,python-3) + ("pkg-config", pkg-config))) + (home-page "https://lttng.org/") + (synopsis "LTTng userspace tracer libraries") + (description "The user space tracing library, liblttng-ust, is the LTTng +user space tracer. It receives commands from a session daemon, for example to +enable and disable specific instrumentation points, and writes event records +to ring buffers shared with a consumer daemon.") + (license license:lgpl2.1+))) + +(define-public lttng-tools + (package + (name "lttng-tools") + (version "2.13.1") + (source (origin + (method url-fetch) + (uri (string-append "https://lttng.org/files/lttng-tools/" + "lttng-tools-" version ".tar.bz2")) + (sha256 + (base32 + "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng")))) + (build-system gnu-build-system) + (arguments + `(;; FIXME - Currently there's a segmentation fault by swig when enabling + ;; Python's bindings. Thus, bindings are disable here. Replace + ;; `disable` by `enable` in #:configure-flags when this is fixed. + #:configure-flags '("--disable-python-bindings") + ;; FIXME - Tests are disabled for now because one test hangs + ;; indefinetely. Also, parallel testing is not possible because of how + ;; the lttng-daemon handles sessions. Thus, keep parallel testing + ;; disabled even after tests are enabled! + #:tests? #f + #:parallel-tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'set-environment-variables + (lambda _ + (setenv "HOME" "/tmp") + (setenv "LTTNG_HOME" "/tmp"))) + ;; We don't put (which "man") here because LTTng uses execlp. + (add-after 'unpack 'patch-default-man-path + (lambda _ + (substitute* "src/common/defaults.h" + (("/usr/bin/man") "man"))))))) + ;; NOTE - Users have to install python-3 in their profile to use the + ;; bindings. We don't put it in the inputs, because the rest of the tools + ;; can work without it. + (inputs + `(("liburcu" ,liburcu) + ("popt" ,popt) + ("numactl" ,numactl))) + (propagated-inputs + `(("kmod" ,kmod) + ("module-init-tools" ,module-init-tools))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("perl" ,perl) + ("libpfm4" ,libpfm4) + ("python-3" ,python-3) + ("swig" ,swig) + ("procps" ,procps) + ("which" ,which) + ("flex" ,flex) + ("bison" ,bison) + ("asciidoc" ,asciidoc) + ("libxml2" ,libxml2) + ("lttng-ust" ,lttng-ust))) + (home-page "https://lttng.org/") + (synopsis "LTTng userspace tracer libraries") + (description "The lttng-tools project provides a session +daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command +line for tracing control, a @code{lttng-ctl} library for tracing control and a +@code{lttng-relayd} for network streaming.") + (license (list license:gpl2 license:lgpl2.1)))) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index ece3c588e8..8456450e52 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -131,7 +131,6 @@ (define-module (gnu packages linux) #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) #:use-module (gnu packages slang) - #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) @@ -8110,152 +8109,6 @@ (define-public ell platforms, it is not limited to resource-constrained systems.") (license license:lgpl2.1+))) -(define-public lttng-ust - (package - (name "lttng-ust") - (version "2.13.0") - (source (origin - (method url-fetch) - (uri (string-append "https://lttng.org/files/lttng-ust/" - "lttng-ust-" version ".tar.bz2")) - (sha256 - (base32 - "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l")))) - (build-system gnu-build-system) - (inputs - `(("liburcu" ,liburcu) - ("numactl" ,numactl))) - (native-inputs - `(("python" ,python-3) - ("pkg-config", pkg-config))) - (home-page "https://lttng.org/") - (synopsis "LTTng userspace tracer libraries") - (description "The user space tracing library, liblttng-ust, is the LTTng -user space tracer. It receives commands from a session daemon, for example to -enable and disable specific instrumentation points, and writes event records -to ring buffers shared with a consumer daemon.") - (license license:lgpl2.1+))) - -(define-public lttng-tools - (package - (name "lttng-tools") - (version "2.13.1") - (source (origin - (method url-fetch) - (uri (string-append "https://lttng.org/files/lttng-tools/" - "lttng-tools-" version ".tar.bz2")) - (sha256 - (base32 - "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng")))) - (build-system gnu-build-system) - (arguments - `(;; FIXME - Currently there's a segmentation fault by swig when enabling - ;; Python's bindings. Thus, bindings are disable here. Replace - ;; `disable` by `enable` in #:configure-flags when this is fixed. - #:configure-flags '("--disable-python-bindings") - ;; FIXME - Tests are disabled for now because one test hangs - ;; indefinetely. Also, parallel testing is not possible because of how - ;; the lttng-daemon handles sessions. Thus, keep parallel testing - ;; disabled even after tests are enabled! - #:tests? #f - #:parallel-tests? #f - #:phases - (modify-phases %standard-phases - (add-before 'configure 'set-environment-variables - (lambda _ - (setenv "HOME" "/tmp") - (setenv "LTTNG_HOME" "/tmp"))) - ;; We don't put (which "man") here because LTTng uses execlp. - (add-after 'unpack 'patch-default-man-path - (lambda _ - (substitute* "src/common/defaults.h" - (("/usr/bin/man") "man"))))))) - ;; NOTE - Users have to install python-3 in their profile to use the - ;; bindings. We don't put it in the inputs, because the rest of the tools - ;; can work without it. - (inputs - `(("liburcu" ,liburcu) - ("popt" ,popt) - ("numactl" ,numactl))) - (propagated-inputs - `(("kmod" ,kmod) - ("module-init-tools" ,module-init-tools))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("perl" ,perl) - ("libpfm4" ,libpfm4) - ("python-3" ,python-3) - ("swig" ,swig) - ("procps" ,procps) - ("which" ,which) - ("flex" ,flex) - ("bison" ,bison) - ("asciidoc" ,asciidoc) - ("libxml2" ,libxml2) - ("lttng-ust" ,lttng-ust))) - (home-page "https://lttng.org/") - (synopsis "LTTng userspace tracer libraries") - (description "The lttng-tools project provides a session -daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command -line for tracing control, a @code{lttng-ctl} library for tracing control and a -@code{lttng-relayd} for network streaming.") - (license (list license:gpl2 license:lgpl2.1)))) - -(define-public babeltrace - (package - (name "babeltrace") - (version "2.0.4") - (source (origin - (method url-fetch) - (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-" - version ".tar.bz2")) - (sha256 - (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp")))) - - (build-system gnu-build-system) - - (arguments - `(;; FIXME - When Python's bindings are enabled, tests do not pass. - #:configure-flags '("--enable-debug-info" - "--enable-man-pages" - "--disable-python-bindings" - "--disable-python-plugins") - #:phases - (modify-phases %standard-phases - ;; These are recommended in the project's README for a development - ;; build configuration. - (add-before 'configure 'set-environment-variables - (lambda _ - (setenv "BABELTRACE_DEV_MODE" "1") - (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE")))))) - (inputs - `(("glib" ,glib))) - ;; NOTE - elfutils is used for the LTTng debug information filter - ;; component class. This can be moved to `native-inputs` if - ;; `--enable-debug-info` is replaced by `--disable-debug-info` in - ;; `#:configure-flags`. - (propagated-inputs - `(("elfutils" ,elfutils))) - ;; NOTE - python-3 is set here for generating the bindings. Users need to - ;; install python-3 in their profile in order to use these bindings. - (native-inputs - `(("asciidoc" ,asciidoc) - ("bison" ,bison) - ("flex" ,flex) - ("pkg-config" ,pkg-config) - ("python-3" ,python-3) - ("python-sphinx" ,python-sphinx) - ("swig", swig) - ("xmltoman" ,xmltoman))) - (home-page "https://babeltrace.org/") - (synopsis "Trace manipulation toolkit") - (description "Babeltrace 2 is a framework for viewing, converting, -transforming, and analyzing traces. It is also the reference parser -implementation of the Common Trace Format (CTF), produced by tools such as -LTTng and barectf. This package provides a library with a C API, Python 3 -bindings, and the command-line tool @command{babeltrace2}.") - (license license:expat))) - (define-public kexec-tools (package (name "kexec-tools") -- 2.34.0