Add trace-cmd, traceshark, kernelshark

  • Open
  • quality assurance status badge
Details
2 participants
  • phodina
  • Vagrant Cascadian
Owner
unassigned
Submitted by
phodina
Severity
normal
P
P
phodina wrote on 12 Dec 2022 20:58
[PATCH 1/5] gnu: Add libtraceevent.
CsEffs0C-u7zD6nmzujZTy1Vl4u7YWrKOudYhRqLlnVcf4TfM7oF7iATtE1IoJECUxW6Q9JxWVVwT6P9N1L9AfYonk_5riPTgW_kcbbIF0Q=@protonmail.com
Hi,

the following patch set adds tracing tools to Linux.

----
Petr
Attachment: file
From 78168fe71a768c39f628caffa103507cfbf04ca5 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 12 Dec 2022 15:11:15 +0100
Subject: [PATCH 3/5] gnu: Add trace-cmd.

* gnu/packages/linux.scm (trace-cmd): New variable.

Toggle diff (49 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1037dea879..1883a5bdd3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6294,6 +6294,42 @@ (define-public tmon
(license (list license:gpl2 ; the man page
license:gpl2+)))) ; the actual rest
+(define-public trace-cmd
+ (package
+ (name "trace-cmd")
+ (version "3.1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ddzw7069h0cdf7rpw5fcz7jwnhcv1i6s262p0m3c3gvpmfhjzj4"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f
+ #:make-flags #~(list (string-append "pkgconfig_dir="
+ #$output "/lib/pkgconfig")
+ (string-append "etcdir=" #$output "/etc")
+ (string-append "prefix=" #$output)
+ (string-append "CC=" #$(cc-for-target)) "libs")
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'populate-pc
+ (lambda* _
+ (substitute* "Makefile"
+ (("^install:") "install: install_libs ")
+ (("^all:") "all: libs")))))))
+ (native-inputs (list pkg-config swig))
+ (inputs (list audit libtraceevent libtracefs python zstd))
+ (home-page "https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git")
+ (synopsis "The front-end application to @code{ftrace}")
+ (description
+ "This application provides the front-end application to
+@code{ftrace} and the back-end application to @code{KernelShark}.")
+ (license license:gpl3+)))
+
(define-public turbostat
(package
(name "turbostat")
--
2.38.1
From 10eba06d3db8f3380597265a5dc3f5d450f97c73 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 12 Dec 2022 15:10:07 +0100
Subject: [PATCH 2/5] gnu: Add libtracefs.

* gnu/packages/linux.scm (libtracefs): New variable.

Toggle diff (51 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 99bce3b8b6..1037dea879 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9567,6 +9567,44 @@ (define-public libtraceevent
formats.")
(license license:gpl3+)))
+(define-public libtracefs
+ (package
+ (name "libtracefs")
+ (version "1.6.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-libracefs-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "14y5rqqyb5syi6nc31kwq6605acpr4w6g2mjqx0ppx2jan6g5djf"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-makefile
+ (lambda* _
+ (substitute* "Makefile"
+ (("/usr/local") #$output)
+ (("\\$\\(shell which valgrind\\)")
+ #$(this-package-input "valgrind"))
+ (("\\$\\(gcc\\)") #$(cc-for-target))
+ (("/bin/pwd") (which "pwd")))
+ (substitute* "scripts/utils.mk"
+ (("\\$\\(pkgconfig_dir\\)")
+ (string-append #$output "/lib/pkgconfig"))
+ (("\\$\\(CC\\)") #$(cc-for-target))
+ (("/bin/pwd") (which "pwd"))))))))
+ (native-inputs (list pkg-config which valgrind))
+ (inputs (list libtraceevent))
+ (home-page "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git")
+ (synopsis "Linux kernel trace file system library")
+ (description "This package provides interface for enabling and
+reading trace events.")
+ (license license:gpl3+)))
+
(define-public libtree
(package
(name "libtree")
--
2.38.1
From 53e302f5123a959e0ebcce5767663206ce8edc33 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 12 Dec 2022 10:48:07 +0100
Subject: [PATCH 1/5] gnu: Add libtraceevent.

* gnu/packages/linux.scm (libtraceevent): New variable.

Toggle diff (45 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c9a21f590f..99bce3b8b6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9535,6 +9535,38 @@ (define-public libgpiod
license:gpl2+ ;; gpio-tools
license:lgpl3+)))) ;; C++ bindings
+(define-public libtraceevent
+ (package
+ (name "libtraceevent")
+ (version "1.6.4")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1vnnhkwqy9ds3fqh7c9fvbhi2k2h701ga842j5nggdkyp0wp5c8c"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-makefile
+ (lambda* _
+ (substitute* "Makefile"
+ (("\\$\\(pkgconfig_dir\\)")
+ (string-append #$output "/lib/pkgconfig"))
+ (("/usr/local") #$output)
+ (("/bin/pwd") (which "pwd")))
+ (substitute* "scripts/utils.mk"
+ (("/bin/pwd") (which "pwd"))))))))
+ (native-inputs (list pkg-config which))
+ (home-page "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/")
+ (synopsis "Linux kernel trace event library")
+ (description "This package provides library to parse raw trace event
+formats.")
+ (license license:gpl3+)))
+
(define-public libtree
(package
(name "libtree")
--
2.38.1
From f04841d72e24abd128116cabd2badc4700e05199 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 12 Dec 2022 15:12:04 +0100
Subject: [PATCH 5/5] gnu: Add traceshark.

* gnu/packages/linux.scm (traceshark): New variable.

Toggle diff (50 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 036ad48b76..02babf896a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -179,6 +179,7 @@ (define-module (gnu packages linux)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix build-system trivial)
#:use-module (guix build-system linux-module)
#:use-module (guix download)
@@ -6333,6 +6334,35 @@ (define-public trace-cmd
@code{ftrace} and the back-end application to @code{KernelShark}.")
(license license:gpl3+)))
+(define-public traceshark
+ (package
+ (name "traceshark")
+ (version "0.9.13")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cunctator/traceshark")
+ (commit (string-append "v" version "-beta"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "167isad5kfv8cv3k3z1hcpv3yc2i7wlabakr6ji0b17zhl68vn8h"))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:tests? #f ; no test suite
+ #:phases #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda* _
+ (substitute* "traceshark.pro"
+ (("/usr") #$output))
+ (invoke "qmake"))))))
+ (inputs (list qtbase-5))
+ (home-page "https://github.com/cunctator/traceshark")
+ (synopsis "Kernel ftrace and perf events visualization")
+ (description "This package provides a graphical viewer for the Ftrace and
+Perf events that can be captured by the Linux kernel.")
+ (license license:gpl3+)))
+
(define-public turbostat
(package
(name "turbostat")
--
2.38.1
V
V
Vagrant Cascadian wrote on 2 Sep 2023 06:55
(address . control@debbugs.gnu.org)
87ttsdnpgs.fsf@wireframe
retitle 60018 Add trace-cmd, traceshark, kernelshark
thanks

On 2022-12-12, phodina wrote:
Toggle quote (4 lines)
> * gnu/packages/linux.scm (trace-cmd): New variable.
> * gnu/packages/linux.scm (traceshark): New variable.
> * gnu/packages/linux.scm (kernelshark): New variable.

Not yet added.

Toggle quote (3 lines)
> * gnu/packages/linux.scm (libtracefs): New variable.
> * gnu/packages/linux.scm (libtraceevent): New variable.

Were added in:

2c7f12a6cb3f8a6646098ef8985c0f6061ccd3fc gnu: Add libtracefs.
b6a1b61f00c5d24b112dc33a7fbdf1e36430a237 gnu: Add libtraceevent.

Retitled bug with the outstanding packages.

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZPLAUwAKCRDcUY/If5cW
qjX9AQDZFqRqlPVLLOXx4NlC1IdvADPtY4jhafQ9Kiby5smugAD8C7B87kTVlH/h
JezoE5Nk6ik/hjTs/n1v/Nd2oGTdvgw=
=NVvx
-----END PGP SIGNATURE-----

?