From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id BQ1CBPre5WEXGAAAgWs5BA (envelope-from ) for ; Mon, 17 Jan 2022 22:26:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8BaQAPre5WHgLwAA9RJhRA (envelope-from ) for ; Mon, 17 Jan 2022 22:26:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9DACA1E3C9 for ; Mon, 17 Jan 2022 22:26:17 +0100 (CET) Received: from localhost ([::1]:43102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9ZW4-0000I3-P1 for larch@yhetil.org; Mon, 17 Jan 2022 16:26:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ZVq-0000Hb-B4 for guix-patches@gnu.org; Mon, 17 Jan 2022 16:26:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9ZVq-0005VZ-1J for guix-patches@gnu.org; Mon, 17 Jan 2022 16:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9ZVp-000769-N7 for guix-patches@gnu.org; Mon, 17 Jan 2022 16:26:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53324] [PATCH v2] gnu: Add uftrace. References: In-Reply-To: Resent-From: Olivier Dion Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Jan 2022 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53324 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53324@debbugs.gnu.org Cc: Olivier Dion Received: via spool by 53324-submit@debbugs.gnu.org id=B53324.164245473127246 (code B ref 53324); Mon, 17 Jan 2022 21:26:01 +0000 Received: (at 53324) by debbugs.gnu.org; 17 Jan 2022 21:25:31 +0000 Received: from localhost ([127.0.0.1]:48291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ZVL-00075O-96 for submit@debbugs.gnu.org; Mon, 17 Jan 2022 16:25:31 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:56194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ZVH-000755-F3 for 53324@debbugs.gnu.org; Mon, 17 Jan 2022 16:25:29 -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 20HLPCA2031873 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 17 Jan 2022 16:25:20 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 20HLPCA2031873 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1642454721; bh=PAZLSEFM0EfjSYA27RUza92AicSq2SWtIw71sC7IJhU=; h=From:To:Cc:Subject:Date:From; b=MpSpDJLiQMK1FTEwJlrwz63w509hpSug0s0FSPoLY1G8Z7M8v2RhX8TGP7VXHIPlj nx8u9y7cFw850xWGpUL2BgD1UXY1Il+4His397bIzEPSz0DKzilJoCVHfiP8hC/WHw 3yx8/Dduyz2OOlLCtEGJcF7Yi7F5cC3e+PGVS66I= Date: Mon, 17 Jan 2022 16:25:11 -0500 Message-Id: <444ae3feb5c1de399608abb52ba9238a61019098.1642454641.git.olivier.dion@polymtl.ca> 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 Mon, 17 Jan 2022 21:25:12 +0000 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Olivier Dion X-ACL-Warn: , Olivier Dion via Guix-patches From: Olivier Dion via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642454777; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PAZLSEFM0EfjSYA27RUza92AicSq2SWtIw71sC7IJhU=; b=NdmmVNsSBRz5dSRbO0ZhnAO0ObLjux7Zk4FMIPuHyZHaCR0akYxdIWvm1Ae9i+TgA7ISpH TPlG7ykZd1C8cmB9yCADTVeeHwhvUqeII0vL4szikS4UwAPzoyHyrYsDSGZNTL8+Ry2mKY iPyXxFd6np1KpUXvP2M6EJigzuHuJqfsfkuN5+r0hxJDy8yvWOy0AXT3xBl/7sG9iEO80v 7Ow0lZPbDJpcGpvms0L5P9h+RJxtBaUsmANOLVfPGQwL3KAbLQmcqnOo2n1WvufKTl9/l6 sf6jP78/lZcElQMNhFRN0rzTig0jCuKcG4ow7zV9GfnTHZ5V3dXsivHurBvoYA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642454777; a=rsa-sha256; cv=none; b=X3IoNxc2Ztgbsl6iAgeqSCygK485ZDxGdEFlkk8hYsv3sqb1U9IEXe2KRPWiI30GI4Nv/3 D6I1pL6XJUpxMqlRsn9BMLhxWwL0mfsDnS9rzMvN4rRhTtA2Kx6hab9PDi5qLZwKpu35uy whvxs4r40HVVkhfxXjM2p3w+RDeb8MboylPCq+RnQNq4I/4LHIqed99kooVIAVqJqSfzXX 5UE+6jX4KZA3mx5CJ5fas3BgOzvmy4tCJKNfR9ewMopXiMFtGaKvF38BpyYA35Knl9MDqW 6rYztfIk9TpHXiGdefHivNV1CwEqaFAYYMqJupMoIe03C4ZSgrqufW0MzwQpXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=MpSpDJLi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=MpSpDJLi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9DACA1E3C9 X-Spam-Score: -3.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: k1OK208X3Pvr * gnu/packages/instrumentation.scm: (uftrace): New variable. --- gnu/packages/instrumentation.scm | 72 +++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm index 86b80d65ec..29c15d1deb 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,67 @@ (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 outputs target #:allow-other-keys) + (let ((arch ,(system->linux-architecture + (or (%current-target-system) + (%current-system))))) + (setenv "ARCH" + (cond + ((string=? arch "arm64") "aarch64") + (else arch))) + (when target + (setenv "CROSS_COMPILE" (string-append target "-")))) + (setenv "SHELL" (which "sh")) + (invoke "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")))))))) + (native-search-paths + (list (search-path-specification + (variable "TERMINFO_DIRS") + (files '("share/terminfo"))))) + (inputs + (list + capstone + elfutils + libunwind + ncurses)) + (native-inputs + (list + luajit + pandoc + pkg-config + python-wrapper)) + (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}. User that want to do +scripting need to install python-3 or luajit in their profile.") + (license license:gpl2))) -- 2.34.0