gnu: Move instrumentation tools to instrumentation module.

* gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
* gnu/packages/instrumentation.scm: ... here.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Olivier Dion 2021-12-16 13:40:17 -05:00 committed by Ludovic Courtès
parent 2068e3ccd9
commit 72437be528
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 157 additions and 142 deletions

View file

@ -17,16 +17,87 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(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
(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 dyninst
(package
(name "dyninst")
@ -75,3 +146,89 @@ (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.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))))

View file

@ -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)
@ -8182,147 +8181,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")