From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 22 14:14:04 2021 Received: (at submit) by debbugs.gnu.org; 22 Nov 2021 19:14:04 +0000 Received: from localhost ([127.0.0.1]:49141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpElH-0005l1-Mj for submit@debbugs.gnu.org; Mon, 22 Nov 2021 14:14:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:39610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpElC-0005ko-Vt for submit@debbugs.gnu.org; Mon, 22 Nov 2021 14:13:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpEl8-0002J7-Cu for guix-patches@gnu.org; Mon, 22 Nov 2021 14:13:48 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:57505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpEl3-0004uh-Bs for guix-patches@gnu.org; Mon, 22 Nov 2021 14:13:45 -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 1AMJDN02012618 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 22 Nov 2021 14:13:33 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1AMJDN02012618 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1637608413; bh=cnwldEVZvUVzV2wZjborPXxhW5vZc3rll/K2m2xN0d8=; h=From:To:Cc:Subject:Date:From; b=JsqY3I21sjJrhbbcrKU7vyUbuv3NjVXRVV6CewOJU1lwZFijWRcTUTMfmm+ZDoYfC 90JAxGKzAVdmPcvAuGug9g2l1Q04IAJniAATvxC0ggSPNsHUvszNvZNisYxm0vU135 4eZ/KtSVdwDw/eRQcJPIlKqLFCpEI+wwOrrunirI= From: Olivier Dion To: guix-patches@gnu.org Subject: [PATCH 1/2] gnu: Add instrumentation packages. Date: Mon, 22 Nov 2021 14:13:22 -0500 Message-Id: <60c77ab6e2f5f098b1ecdc9c50c602072dbc2f68.1637608343.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Mon, 22 Nov 2021 19:13:23 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/instrumentation.scm: New file (dyninst): New variable. --- gnu/local.mk | 1 + gnu/packages/instrumentation.scm | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 gnu/packages/instrumentation.scm diff --git a/gnu/local.mk b/gnu/local.mk index 2513530d0d..3f190c4f6a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ %D%/packages/installers.scm \ + %D%/packages/instrumentation.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/irods.scm \ diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm new file mode 100644 index 0000000000..cacd74ac0a --- /dev/null +++ b/gnu/packages/instrumentation.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Olivier Dion +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages instrumentation) + #:use-module (gnu packages boost) + #:use-module (gnu packages elf) + #:use-module (gnu packages llvm) + #:use-module (gnu packages tbb) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public dyninst + (package + (name "dyninst") + ;; Newer versions are not promoted on main home page and require libiberty. + (version "10.2.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/dyninst/dyninst/archive/v" + version ".tar.gz")) + (sha256 + (base32 "18bvmvm3l18lpw8fz9yrjkd6fwqvxg0j2xfhvkzx4xr5l73wcxw0")))) + + (build-system cmake-build-system) + (arguments + `(#:tests? #f + ;; STERILE_BUILD: Do not download/build third-party dependencies from + ;; source. + #:configure-flags + (list "-DSTERILE_BUILD=ON"))) + (inputs + `(("elfutils" ,elfutils) + ("boost" ,boost) + ("tbb" ,tbb) + ("libomp" ,libomp))) + (home-page "https://dyninst.org/") + (synopsis "Dynamic instrumentation") + (description "Tools for binary instrumentation, analysis, and modification.") + (license license:lgpl2.0))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 22 14:16:30 2021 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= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH 2/2] gnu: Move instrumentation tools to instrumentation module. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 22 20:53:46 2021 Received: (at 52043) by debbugs.gnu.org; 23 Nov 2021 01:53:47 +0000 Received: from localhost ([127.0.0.1]:49484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpL0E-0001mo-D7 for submit@debbugs.gnu.org; Mon, 22 Nov 2021 20:53:46 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:42354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpL08-0001mV-UO for 52043@debbugs.gnu.org; Mon, 22 Nov 2021 20:53:44 -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 1AN1rOaD002855 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 22 Nov 2021 20:53:32 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1AN1rOaD002855 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1637632413; bh=XheZ88sIiFc3dTZKZrL22wqxL7VhhIJf0SppDqy3KDc=; h=From:To:Cc:Subject:Date:From; b=oML6S9WaIN/kkGTkinZ+uHN+WUO0pWmp1ChSk8wzwuopOZO+lsGCuUMpMWGq5J0K8 /shtrDM6jz9xS4DR5b7yVtjCSRCkdzl2DzZktsyWslUeFaTL+wbscD8jvxt5DYkbL3 O25txsfTwxQikegV6n8Io+NbRY5IoAly1MePNExQ= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v2 1/2] gnu: Add instrumentation packages. Date: Mon, 22 Nov 2021 20:53:23 -0500 Message-Id: <1bbfcda6f8e1c1fd94170b9af7186076d4f5bc3c.1637632353.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Tue, 23 Nov 2021 01:53:24 +0000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/instrumentation.scm: New file (dyninst): New variable. --- gnu/local.mk | 1 + gnu/packages/instrumentation.scm | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 gnu/packages/instrumentation.scm diff --git a/gnu/local.mk b/gnu/local.mk index 3227fc3835..26dc098417 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ %D%/packages/installers.scm \ + %D%/packages/instrumentation.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/irods.scm \ diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm new file mode 100644 index 0000000000..8b55b313dc --- /dev/null +++ b/gnu/packages/instrumentation.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Olivier Dion +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages instrumentation) + #:use-module (gnu packages boost) + #:use-module (gnu packages elf) + #:use-module (gnu packages llvm) + #:use-module (gnu packages tbb) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public dyninst + (package + (name "dyninst") + ;; Newer versions are not promoted on main home page and require libiberty. + (version "10.2.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/dyninst/dyninst/archive/v" + version ".tar.gz")) + (sha256 + (base32 "18bvmvm3l18lpw8fz9yrjkd6fwqvxg0j2xfhvkzx4xr5l73wcxw0")))) + + (build-system cmake-build-system) + (arguments + `(#:tests? #f + ;; STERILE_BUILD: Do not download/build third-party dependencies from + ;; source. + #:configure-flags + (list "-DSTERILE_BUILD=ON"))) + (propagated-inputs + `(("elfutils" ,elfutils) + ("boost" ,boost) + ("tbb" ,tbb) + ("libomp" ,libomp))) + (home-page "https://dyninst.org/") + (synopsis "Dynamic instrumentation") + (description "Tools for binary instrumentation, analysis, and modification.") + (license license:lgpl2.0))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 10 09:32:39 2021 Received: (at 52043) by debbugs.gnu.org; 10 Dec 2021 14:32:39 +0000 Received: from localhost ([127.0.0.1]:46026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvgwx-0001Ac-Il for submit@debbugs.gnu.org; Fri, 10 Dec 2021 09:32:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvgwu-0001AM-HV for 52043@debbugs.gnu.org; Fri, 10 Dec 2021 09:32:39 -0500 Received: from [2001:470:142:3::e] (port=54160 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvgwp-0002Cl-8p; Fri, 10 Dec 2021 09:32:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ywPMo6P48zDdcX9CkqqXCyYSWyalalNhyWzxNu2II1I=; b=AOV0P4kNReE9u5hYCfaZ du9mnKvIbYdpywNpcd/ZyTIljYn3Wl2DjKmVO4SMvLXRlwDgXRkwLpl3r3OyG5pCONAzp2nj/DlMK wrQOuB9+UvoZq0Hb/iC4KqCdAO44ZFRGAfoM45x0BNVyWNZmZzB5EUWKi3m4Xv3h8NA0JjXa2r8ww 202qR/p8IWnAYtJ4s2lWxX6wTw+6E1hQHU+a7dsT4G+OwkI15bWAk+E/kT1ASNWLNs7459EfU1M+n ZpMeLDaTGX6J5jwZjfVCUyY52lTpqDsD/t967tFdOC0vZBWv2mXrzcS0j0XJtzfQ8zn5IYIMemmgd FsJTqEI5g1N3Wg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62969 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvgwp-0006da-6H; Fri, 10 Dec 2021 09:32:31 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Olivier Dion Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages. References: <60c77ab6e2f5f098b1ecdc9c50c602072dbc2f68.1637608343.git.olivier.dion@polymtl.ca> <1bbfcda6f8e1c1fd94170b9af7186076d4f5bc3c.1637632353.git.olivier.dion@polymtl.ca> Date: Fri, 10 Dec 2021 15:32:29 +0100 In-Reply-To: <1bbfcda6f8e1c1fd94170b9af7186076d4f5bc3c.1637632353.git.olivier.dion@polymtl.ca> (Olivier Dion's message of "Mon, 22 Nov 2021 20:53:23 -0500") Message-ID: <87pmq47coy.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: 52043@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Olivier Dion skribis: > * gnu/packages/instrumentation.scm: New file > (dyninst): New variable. [...] > + (name "dyninst") > + ;; Newer versions are not promoted on main home page and require lib= iberty. Note that there=E2=80=99s a =E2=80=98libiberty=E2=80=99 package. > + (version "10.2.1") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/dyninst/dyninst/ar= chive/v" > + version ".tar.gz")) As reported by =E2=80=98guix lint=E2=80=99, this URL refers to an autogener= ated tarball whose content may change over time. Could you instead use =E2=80=98git-fetch=E2=80=99? > + (synopsis "Dynamic instrumentation") > + (description "Tools for binary instrumentation, analysis, and modifi= cation.") Please expound a bit and write full sentences: https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html Otherwise LGTM. Could you send an updated patch? The second patch LGTM. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 14:59:20 2021 Received: (at 52043) by debbugs.gnu.org; 12 Dec 2021 19:59:21 +0000 Received: from localhost ([127.0.0.1]:53212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwV0C-0001s5-G4 for submit@debbugs.gnu.org; Sun, 12 Dec 2021 14:59:20 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:46256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwV0A-0001ro-Eb for 52043@debbugs.gnu.org; Sun, 12 Dec 2021 14:59:19 -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 1BCJx2PH028885 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 12 Dec 2021 14:59:11 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BCJx2PH028885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639339151; bh=8LQhX7rjv17glQSsD3IJffUAtUG+/yH1IIT22uSoyfU=; h=From:To:Cc:Subject:Date:From; b=eKWUJqBV44ZaBiGywb/8yEW+3SVQLe8INjp/23YTTiRkEtVmwrqg7xcTvx64e1AVc kPw9pcZYj6sf0DQBUw29Z+qFI7Sv9aXh7qcCQl+iEOLndHpqNDMXf6zlWd7Z2j8UJc GKyIWeq00TXnMGCAQlpEGJRy01y8j4WgoHaBgsK4= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v3 1/2] gnu: Add instrumentation packages. Date: Sun, 12 Dec 2021 14:59:00 -0500 Message-Id: <2c001a0d0f1e35771db7bffd4e180ca0b4908711.1639339070.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/instrumentation.scm: New file (dyninst): New variable. --- gnu/local.mk | 1 + gnu/packages/instrumentation.scm | 80 ++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 gnu/packages/instrumentation.scm diff --git a/gnu/local.mk b/gnu/local.mk index f485e733e0..012de73306 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ %D%/packages/installers.scm \ + %D%/packages/instrumentation.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/irods.scm \ diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm new file mode 100644 index 0000000000..e9e821e80d --- /dev/null +++ b/gnu/packages/instrumentation.scm @@ -0,0 +1,80 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Olivier Dion +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages instrumentation) + #:use-module (gnu packages boost) + #:use-module (gnu packages elf) + #:use-module (gnu packages llvm) + #:use-module (gnu packages tbb) + #:use-module (guix build-system cmake) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public dyninst + (package + (name "dyninst") + ;; Newer versions are not promoted on main home page. + ;; Upgrade to 12.0.1 if anyone require a newer version. + (version "10.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dyninst/dyninst") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m04pg824rqx647wvk9xl33ri8i6mm0vmrz9924li25dxbr4zqd5")))) + + (build-system cmake-build-system) + (arguments + `(#:tests? #f + ;; STERILE_BUILD: Do not download/build third-party dependencies from + ;; source. + #:configure-flags + (list "-DSTERILE_BUILD=ON") + ;; NOTE: dyninst needs to search for shared libraries that are linked + ;; against the instrumented binary in order to rebuild the entire + ;; program. For this purpose, one can use LD_LIBRARY_PATH or + ;; DYNISNT_REWRITER_PATHS environment variables to add paths for dyinst + ;; to search. However, dyninst also tries to be smart by executing + ;; ldconfig, which is not portable. If ldconfig is not available on + ;; the system, dyinst wrongly assumes that the shared libraries can not + ;; be found, even though it can. This bad logic is still there with + ;; newer versions of dyinst. Thus, this substitution makes the bad + ;; code path unreachable. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-bad-logic + (lambda _ + (substitute* "dyninstAPI/src/linux.C" + (("if\\(\\!fgets\\(buffer, 512, ldconfig\\)\\)") + "fgets(buffer, 512, ldconfig); if (false)"))))))) + (propagated-inputs + `(("elfutils" ,elfutils) + ("boost" ,boost) + ("tbb" ,tbb) + ("libomp" ,libomp))) + (home-page "https://dyninst.org/") + (synopsis "Dynamic instrumentation") + (description "Dyninst is a collection of libraries for instrumenting, +analyzing and editing binaries. It can attach to an existing program or +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))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 14:59:26 2021 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= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v3 2/2] gnu: Move instrumentation tools to instrumentation module. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 16 13:40:42 2021 Received: (at 52043) by debbugs.gnu.org; 16 Dec 2021 18:40:42 +0000 Received: from localhost ([127.0.0.1]:36785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgI-0007u0-4L for submit@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:42 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:41484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgF-0007tY-6h for 52043@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:41 -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 1BGIeIfa011800 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 16 Dec 2021 13:40:33 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BGIeIfa011800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639680033; bh=9aZa6VcIagvrCh+Y43hp7zCC+z/mg6PU5uI9KI7m6v8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=upFQEvo5DxTHcOQ2Gp3JagFNEpSws0dBGkk/5BVtwPwflukZySyPcowx73kO/SUHe rLXZCxq9gftKe+79kvigoNVYd1/AxrWCxcxw80bfmiLmDpkSPQ2eVVvZmUU+OB1j+5 xJq50qwpVZx5jd/GP4dZAp34LLqedMZ4IfoLXEHQ= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v4 1/2] gnu: Add instrumentation packages. Date: Thu, 16 Dec 2021 13:40:16 -0500 Message-Id: <531220f26d0a483c72ae613f710fa0267f5d5c72.1639679743.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Thu, 16 Dec 2021 18:40:18 +0000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/instrumentation.scm: New file (dyninst): New variable. --- gnu/local.mk | 1 + gnu/packages/instrumentation.scm | 79 ++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 gnu/packages/instrumentation.scm diff --git a/gnu/local.mk b/gnu/local.mk index 51c4f41331..76bfedbb9c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -309,6 +309,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ %D%/packages/installers.scm \ + %D%/packages/instrumentation.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/irods.scm \ diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm new file mode 100644 index 0000000000..d8de52facd --- /dev/null +++ b/gnu/packages/instrumentation.scm @@ -0,0 +1,79 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Olivier Dion +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages instrumentation) + #:use-module (gnu packages boost) + #:use-module (gnu packages elf) + #:use-module (gnu packages llvm) + #:use-module (gnu packages tbb) + #:use-module (guix build-system cmake) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public dyninst + (package + (name "dyninst") + ;; Newer versions are not promoted on main home page. + ;; Upgrade to 12.0.1 if anyone require a newer version. + (version "10.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dyninst/dyninst") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m04pg824rqx647wvk9xl33ri8i6mm0vmrz9924li25dxbr4zqd5")))) + + (build-system cmake-build-system) + (arguments + `(#:tests? #f + ;; STERILE_BUILD: Do not download/build third-party dependencies from + ;; source. + #:configure-flags + (list "-DSTERILE_BUILD=ON") + ;; NOTE: dyninst needs to search for shared libraries that are linked + ;; against the instrumented binary in order to rebuild the entire + ;; program. For this purpose, one can use LD_LIBRARY_PATH or + ;; DYNISNT_REWRITER_PATHS environment variables to add paths for dyinst + ;; to search. However, dyninst also tries to be smart by executing + ;; ldconfig, which is not portable. If ldconfig is not available on + ;; the system, dyinst wrongly assumes that the shared libraries can not + ;; be found, even though it can. This bad logic is still there with + ;; newer versions of dyinst. Thus, this substitution makes the bad + ;; code path unreachable. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-bad-logic + (lambda _ + (substitute* "dyninstAPI/src/linux.C" + (("if\\(\\!fgets\\(buffer, 512, ldconfig\\)\\)") + "fgets(buffer, 512, ldconfig); if (false)"))))))) + (propagated-inputs + `(("elfutils" ,elfutils) + ("boost" ,boost) + ("tbb" ,tbb-2020))) + (home-page "https://dyninst.org/") + (synopsis "Dynamic instrumentation") + (description "Dyninst is a collection of libraries for instrumenting, +analyzing and editing binaries. It can attach to an existing program or +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))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 16 13:40:47 2021 Received: (at 52043) by debbugs.gnu.org; 16 Dec 2021 18:40:47 +0000 Received: from localhost ([127.0.0.1]:36787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgM-0007uB-IX for submit@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:47 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:33570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgE-0007tW-RO for 52043@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:41 -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 1BGIeIfZ011800 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 16 Dec 2021 13:40:32 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BGIeIfZ011800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639680032; bh=C+FWyxljtegCrWcsytygD49gzwA4SNvKRcZDT7/FlSM=; h=From:To:Cc:Subject:Date:From; b=faPYpx/4KidPmmJ+Wmf0Bk85vjX2wvuMAFQkwUBL2I0AF0qrNUX8zxGdwxtZ32Ihf wCIboQNbni/8qgt+MsekM8MsD036zHJRM7emAtLGmYmcDUHF19BNunj2n7r8qBPRSf ZmOXqGv2feBxp72oIu4flGNTv9oMq/2hYxrf2HII= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v4 0/2] Create instrumentation package Date: Thu, 16 Dec 2021 13:40:15 -0500 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Thu, 16 Dec 2021 18:40:18 +0000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Had to make last minute changes since recent merges. * Changes since v3: - Remove libomp (failed compilation for missing symbol in libgomp) - Change tbb for tbb-2020 (former version is unrecognized by cmake) Olivier Dion (2): gnu: Add instrumentation packages. gnu: Move instrumentation tools to instrumentation module. gnu/local.mk | 1 + gnu/packages/instrumentation.scm | 241 +++++++++++++++++++++++++++++++ gnu/packages/linux.scm | 142 ------------------ 3 files changed, 242 insertions(+), 142 deletions(-) create mode 100644 gnu/packages/instrumentation.scm -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 16 13:40:59 2021 Received: (at 52043) by debbugs.gnu.org; 16 Dec 2021 18:40:59 +0000 Received: from localhost ([127.0.0.1]:36789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgN-0007uD-3d for submit@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:59 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:55180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxvgG-0007ta-1f for 52043@debbugs.gnu.org; Thu, 16 Dec 2021 13:40:41 -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 1BGIeIfb011800 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 16 Dec 2021 13:40:33 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BGIeIfb011800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639680034; bh=8OPnKqQtEbkl5m6sUsedaY2+LukZEi/W+iMp/GkIif0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LYb5pJEi/aBqSE8n1la6X65RPIk/J7DiWGkh7sf3egYzEy7vuFKQJ1b6l7TFD0ohh pYbjeb4mU9Q6723XeVPuXEQ3oIQVAnV7cF5usofG7X0oXsCLgZ5oBPhDnxig4yk/JN 8wadmQurXQ20aUPcAPyctxJU3iDTzeu2YVMiqJUY= From: Olivier Dion To: 52043@debbugs.gnu.org Subject: [PATCH v4 2/2] gnu: Move instrumentation tools to instrumentation module. Date: Thu, 16 Dec 2021 13:40:17 -0500 Message-Id: <114945ebaac1b261dd78505ba2acce22c4f51f0d.1639679743.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Thu, 16 Dec 2021 18:40:18 +0000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: Olivier Dion X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 | 142 --------------------------- 2 files changed, 162 insertions(+), 142 deletions(-) diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm index d8de52facd..00595438b1 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") @@ -77,3 +148,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 a1c9408e89..85086a119d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -138,7 +138,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) @@ -8185,147 +8184,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 - (list liburcu numactl)) - (native-inputs - (list python-3 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 - (list liburcu popt numactl)) - (propagated-inputs - (list kmod 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 - (list 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 - (list 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 18 13:47:32 2021 Received: (at 52043) by debbugs.gnu.org; 18 Dec 2021 18:47:32 +0000 Received: from localhost ([127.0.0.1]:43816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myek0-0007f2-B2 for submit@debbugs.gnu.org; Sat, 18 Dec 2021 13:47:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myejy-0007ep-1Y for 52043@debbugs.gnu.org; Sat, 18 Dec 2021 13:47:30 -0500 Received: from [2001:470:142:3::e] (port=35902 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myejk-0007t9-Sh; Sat, 18 Dec 2021 13:47:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=2UBIZcE0rseutO263btv5xyQVjNvo3iOLs52KuY9wzs=; b=H+4WwwxK4Jc+abF4HZ7Q b/HorQ4h8NfUsqEV52hJ0nEc9ehWbrTuKMP0X0bLAkIww86bXxghZFemjyzl9ysd6TYOdJ3vep9TJ oz2gYNjoJHD84/TY6AgyxVFAUiRXAYwAmkPF3YmRiE0+qmthQ3mO35kPJCgq8diwEK3eU/51DqruP 26zG4x37BxRCeU0RZ3B9npoLFps4ZGyoBCEUTxwjyugoo16iCqIWT3JUwJ+/LYS4Vq4Q+k7YTIZ5k P2E8eSBwIskXlNSO3IMMZXAQ5CPz84YbqsITDogwNtwmG+V9ih8y3kB101ZJfbVhFPBy5XaROPGuI zE+/o0vJhH/lnw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51291 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myejk-0006M6-QP; Sat, 18 Dec 2021 13:47:17 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Olivier Dion Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages. References: <531220f26d0a483c72ae613f710fa0267f5d5c72.1639679743.git.olivier.dion@polymtl.ca> Date: Sat, 18 Dec 2021 19:47:14 +0100 In-Reply-To: <531220f26d0a483c72ae613f710fa0267f5d5c72.1639679743.git.olivier.dion@polymtl.ca> (Olivier Dion's message of "Thu, 16 Dec 2021 13:40:16 -0500") Message-ID: <87zgoxoiml.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043 Cc: 52043@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Olivier Dion skribis: > * gnu/packages/instrumentation.scm: New file > (dyninst): New variable. Applied with simplified inputs and=E2=80=A6 > + (home-page "https://dyninst.org/") > + (synopsis "Dynamic instrumentation") > + (description "Dyninst is a collection of libraries for instrumenting, > +analyzing and editing binaries. It can attach to an existing program or > +create a new one out of an ELF file for analysis or modification. It co= me > +with a handful of C++ libraries.") > + (license license:lgpl2.0))) =E2=80=A6 license changed to =E2=80=98license:lgpl2.1+=E2=80=99, which is w= hat source file headers say. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 18 13:47:48 2021 Received: (at 52043-done) by debbugs.gnu.org; 18 Dec 2021 18:47:48 +0000 Received: from localhost ([127.0.0.1]:43820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myekG-0007gd-JD for submit@debbugs.gnu.org; Sat, 18 Dec 2021 13:47:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myekE-0007ft-O4 for 52043-done@debbugs.gnu.org; Sat, 18 Dec 2021 13:47:47 -0500 Received: from [2001:470:142:3::e] (port=35908 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myek9-0007yk-ET; Sat, 18 Dec 2021 13:47:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=3/OT2zc6C7N46NAtkmIHOz0hY+6NLOYb6KssNPj3yCQ=; b=kWy05YxCdiaH00Ak0cBI 9RjknQul5Sqp47jdkiJpuI3h55O++J9tWkZiJundyXaIo05Nfzc6Ec3DvMYWrsm1TphMkipI4EZnz AAwGN+6k1aM2NtnZ5oJBcoRT3k3+N2aVJzQfHaKs+h9GTFRvfsSo98fpN2W0DCDNC/xsMyj4z7mgX ntFfJ3dGYSrvFntcN/3FFmiyD3EHxsAQSaqJrQXfo2h9XiRtP9o13xQyut1GDskQ0zPvqhL2+t3bO Tn3cpV8XgBspoIvLbHvxUi3LkokO8lsObynODXuIKRmO4oQgg+XbVD8XK37tNe/5QHe0IFAmMz1So MP7YEuE6YtopFQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51408 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myek9-0006PR-DX; Sat, 18 Dec 2021 13:47:41 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Olivier Dion Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages. References: <114945ebaac1b261dd78505ba2acce22c4f51f0d.1639679743.git.olivier.dion@polymtl.ca> Date: Sat, 18 Dec 2021 19:47:39 +0100 In-Reply-To: <114945ebaac1b261dd78505ba2acce22c4f51f0d.1639679743.git.olivier.dion@polymtl.ca> (Olivier Dion's message of "Thu, 16 Dec 2021 13:40:17 -0500") Message-ID: <87v8zloilw.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52043-done Cc: 52043-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Olivier Dion skribis: > * gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ... > * gnu/packages/instrumentation.scm: ... here. Applied as well (updated to preserve simplified inputs). Thanks! Ludo=E2=80=99. From unknown Wed Aug 20 05:16:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 16 Jan 2022 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator