From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +G+GBwNVtmGGBgAAgWs5BA (envelope-from ) for ; Sun, 12 Dec 2021 21:01:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oBMXAwNVtmHKSQAAbx9fmQ (envelope-from ) for ; Sun, 12 Dec 2021 20:01:07 +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 783AB22D93 for ; Sun, 12 Dec 2021 21:01:06 +0100 (CET) Received: from localhost ([::1]:35298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwV1t-0002rj-96 for larch@yhetil.org; Sun, 12 Dec 2021 15:01:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwV0s-0002rR-OQ for guix-patches@gnu.org; Sun, 12 Dec 2021 15:00:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwV0s-0005Mp-FI for guix-patches@gnu.org; Sun, 12 Dec 2021 15:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwV0s-0001tn-Ce for guix-patches@gnu.org; Sun, 12 Dec 2021 15:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52043] [PATCH v3 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: Sun, 12 Dec 2021 20:00: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.16393391667220 (code B ref 52043); Sun, 12 Dec 2021 20:00:02 +0000 Received: (at 52043) by debbugs.gnu.org; 12 Dec 2021 19:59:26 +0000 Received: from localhost ([127.0.0.1]:53215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwV0E-0001sK-Tg for submit@debbugs.gnu.org; Sun, 12 Dec 2021 14:59:26 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:37356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwV0D-0001rs-2d for 52043@debbugs.gnu.org; Sun, 12 Dec 2021 14:59:22 -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 1BCJx2PI028885 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 12 Dec 2021 14:59:14 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BCJx2PI028885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639339155; bh=HHgeskODyQe3Oc/RGpw4Ntn0u9x0NoYAEMzMMnKR2+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ud/NjP4D9d1yiszvuvRQx8Tu1B1jJ0BlN5SAMojvNzEyr704a800t/T90FaujSVHo l9jwjIP5pK+g2n3+1nOsnlt1uhHSJstinTTtSzNY4M/gAK0Y8jBjnRPQTi4wVTC84o 6Yyh2NU4Z+oM6vA+Y9MH2N4HWSgU77gR49OBGFjI= Date: Sun, 12 Dec 2021 14:59:01 -0500 Message-Id: <3405123f6e24a294530619ee63993c5a5cd76e0a.1639339070.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 In-Reply-To: <2c001a0d0f1e35771db7bffd4e180ca0b4908711.1639339070.git.olivier.dion@polymtl.ca> References: <2c001a0d0f1e35771db7bffd4e180ca0b4908711.1639339070.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 Sun, 12 Dec 2021 19:59:02 +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=1639339266; 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=HHgeskODyQe3Oc/RGpw4Ntn0u9x0NoYAEMzMMnKR2+M=; b=Y7DMFZJk/Meav7NClXppVqQR+qpocUFbgQiQJOWG1+d5uFHdj1TZAWTK/2DWOV60HrK49D CkHDp1e5pQg1qmrAfroSjBousRCDX8rrvzrsZedjTOLyZp0fcuXLCm+D/1mKHrrokgo+MC sirkXpaldZraDlNMLvvKVbzU+P06r97uLDzbDMrPC23yndKB/XZ3XbvED82od/MvmV/dp7 Kd5XOb3cHkkjUsc3/GXjLAFI4sFO/blyUG0lVKQS2Onik0I1y0pJ0S72d9le/ti0yLXzkR coXFlsrtSg1oXTrTBRBLBmzdquT7aNdAszvFmVu/nOzXT/CymUOU5rfKuNk3hg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639339266; a=rsa-sha256; cv=none; b=rOQidYiRrDLThvWpK9ZwTzmLgrsQI1JQhiFs5wfkU4aJEJEL5bmxAXUPueBZI5GJZlMaDA NPWJ2QWY3A1ODzXPYt+dayj/xMgWvbAEDoVu0iZVh+ZRMDHDjkf9XyqZblWKK3CJEAzer2 OVKepIGgeIpvEKQcU+ml/fQqXEIhr2LAouG0eipP5cK2j7P/8nvNroU4d7uSa4Y15zxnvJ VaAIiSHsJqrnwtPeKZ79ORKWC11hXv1GtHKPuybRD/MkkodelmyCRTNqTCkv+jq/jlTN2N 31V6HUu/RKRkhPlFZdUkHUXpACHjcUa8nOgBP0oXK12GYXyGLpOPCI2R4JoPeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b="Ud/NjP4D"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b="Ud/NjP4D"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 783AB22D93 X-Spam-Score: -3.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: GiUBS2bkFHI+ * 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 e9e821e80d..048f9d4b2a 100644 --- a/gnu/packages/instrumentation.scm +++ b/gnu/packages/instrumentation.scm @@ -17,16 +17,87 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages instrumentation) + #: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 perl) + #: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 build-system cmake) + #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) +(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") @@ -78,3 +149,94 @@ (define-public dyninst create a new one out of an ELF file for analysis or modification. It come with a handful of C++ libraries.") (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 c2aae58bbf..e6745eac1a 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) @@ -8105,152 +8104,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