all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Olivier Dion via Guix-patches via <guix-patches@gnu.org>
To: 53324@debbugs.gnu.org
Cc: Olivier Dion <olivier.dion@polymtl.ca>
Subject: [bug#53324] [PATCH] gnu: Add uftrace.
Date: Mon, 17 Jan 2022 14:20:09 -0500	[thread overview]
Message-ID: <cf9e68fcec5d2a773245982e8ae25c58d64d5881.1642446918.git.olivier.dion@polymtl.ca> (raw)

* gnu/packages/instrumentation.scm: (uftrace): New variable.
---
 gnu/packages/instrumentation.scm | 68 +++++++++++++++++++++++++++++++-
 1 file changed, 67 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index 86b80d65ec..9aafc28181 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -23,11 +23,16 @@ (define-module (gnu packages instrumentation)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages engineering)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
@@ -43,7 +48,8 @@ (define-module (gnu packages instrumentation)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages))
+  #:use-module (guix packages)
+  #:use-module (guix utils))
 
 (define-public babeltrace
   (package
@@ -238,3 +244,63 @@ (define-public lttng-tools
 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 uftrace
+  (package
+    (name "uftrace")
+    (version "0.11")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/namhyung/uftrace")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0gk0hv3rnf5czvazz1prg21rf9qlniz42g5b389n8a29hqj4q6xr"))))
+    (build-system gnu-build-system)
+    (arguments `(#:make-flags
+                 (list
+                  (string-append "CC=" ,(cc-for-target)))
+                 ;; runtest hang at some point -- probably dues to
+                 ;; failed socket connection -- but we want to keep the
+                 ;; unit tests.  Change the target to "test" when fixed.
+                 #:test-target "unittest"
+                 #:phases
+                 (modify-phases %standard-phases
+                   (replace 'configure
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (setenv "SHELL" (which "sh"))
+                       (invoke "./configure"
+                               (string-append "--prefix="
+                                              (assoc-ref outputs "out")))))
+
+                   (add-after 'unpack 'patch-python-shebangs
+                     (lambda _
+                       (let ([python (which "python3")])
+                         (for-each (lambda (path)
+                                     (substitute* path
+                                       (("/usr/bin/env python") python)))
+                                   (cons "misc/gen-autoargs.py"
+                                         (find-files "tests" "\\.py$")))))))))
+    ;; NOTE!  User should add python-3 and luajit to their profile if they
+    ;; want to do scripting.
+    (propagated-inputs
+     (list
+      capstone
+      elfutils
+      libunwind
+      ncurses))
+    (native-inputs
+     (list
+      luajit
+      pandoc
+      pkg-config
+      python-3))
+    (home-page "https://github.com/namhyung/uftrace")
+    (synopsis "Function graph tracer for C/C++/Rust")
+    (description "uftrace is a tool for tracing and analyzing the execution of
+programs written in C/C++.  It is heavily inspired by the ftrace framework of
+the Linux kernel, while supporting userspace programs.  It supports various
+kind of commands and filters to help analysis of the program execution and
+performance.  It provides the command @command{uftrace}.")
+    (license license:gpl2)))
-- 
2.34.0





             reply	other threads:[~2022-01-17 19:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 19:20 Olivier Dion via Guix-patches via [this message]
2022-01-17 19:34 ` [bug#53324] [PATCH] gnu: Add uftrace Maxime Devos
2022-01-20 14:10   ` Ludovic Courtès
2022-01-20 16:50     ` Maxime Devos
2022-01-17 19:39 ` Maxime Devos
2022-01-17 21:02   ` Olivier Dion via Guix-patches via
2022-01-17 21:37     ` Maxime Devos
2022-01-17 21:55       ` Olivier Dion via Guix-patches via
2022-01-18  7:58         ` Maxime Devos
2022-01-17 21:25 ` [bug#53324] [PATCH v2] " Olivier Dion via Guix-patches via
2022-01-20 14:27   ` bug#53324: [PATCH] " Ludovic Courtès
2022-01-20 14:33     ` [bug#53324] " Olivier Dion via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf9e68fcec5d2a773245982e8ae25c58d64d5881.1642446918.git.olivier.dion@polymtl.ca \
    --to=guix-patches@gnu.org \
    --cc=53324@debbugs.gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.