From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id APtDG7QyL2MIBQAAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 18:39:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MFhIG7QyL2MpGgEA9RJhRA (envelope-from ) for ; Sat, 24 Sep 2022 18:39:16 +0200 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 B294530CE2 for ; Sat, 24 Sep 2022 18:39:15 +0200 (CEST) Received: from localhost ([::1]:45204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc8BO-0001nQ-Th for larch@yhetil.org; Sat, 24 Sep 2022 12:39:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc8BD-0001nI-GJ for guix-patches@gnu.org; Sat, 24 Sep 2022 12:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc8BC-00048S-Jq for guix-patches@gnu.org; Sat, 24 Sep 2022 12:39:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oc8BC-00060s-Bf for guix-patches@gnu.org; Sat, 24 Sep 2022 12:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58045] [PATCH] gnu: Add libpatch. Resent-From: Olivier Dion Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Sep 2022 16:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58045 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58045@debbugs.gnu.org Cc: Olivier Dion , othacehe@gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166403752423087 (code B ref -1); Sat, 24 Sep 2022 16:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Sep 2022 16:38:44 +0000 Received: from localhost ([127.0.0.1]:45136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc8At-00060I-Ny for submit@debbugs.gnu.org; Sat, 24 Sep 2022 12:38:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:50402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc8Al-000605-Lc for submit@debbugs.gnu.org; Sat, 24 Sep 2022 12:38:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc8Al-0001mm-Gp for guix-patches@gnu.org; Sat, 24 Sep 2022 12:38:35 -0400 Received: from smtp.polymtl.ca ([132.207.4.11]:43393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc8Ai-00043C-Fh; Sat, 24 Sep 2022 12:38:34 -0400 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 28OGcHC4025824 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 24 Sep 2022 12:38:24 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 28OGcHC4025824 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1664037505; bh=/11KLkYhV69v1YZLT6/0tFR3tugGI3P0DlfzbF3HBfY=; h=From:To:Cc:Subject:Date:From; b=UxuIhoRVj1r5vlJ/gAkSnIVClX9G9b+JWEjkuMd70q9zLJTpZfBI3PxJQ6pZyglX/ hhFm67LKNF4h4W4Lp903K+hqrBl1cxKXofC+7L3jwoBdS7AGhPok3R6hwcYw/0zhgI Iq5UOtOa4rccfRgYCDgPbQBTR2jW+HfRP0wCVHJw= Date: Sat, 24 Sep 2022 12:38:15 -0400 Message-Id: <3400e6a50d528e085834f77e7159607f22d9b8b9.1664037413.git.olivier.dion@polymtl.ca> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Sat, 24 Sep 2022 16:38:17 +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-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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664037556; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/11KLkYhV69v1YZLT6/0tFR3tugGI3P0DlfzbF3HBfY=; b=pYVPxMjyCUm/p6I2LmQcSugMxn5Qf5Hb/YtmiZqlLKMfYaeiSdzkkVvNNorvaKcJXbAvJw AJuJU0DAF6Bt1mcscs2JBcNZmaACU+h73I+9MSeRkOfjSlRMpKen8tIdrHaSgFjrZiJSiO YGbPaQIZ1DBRAm2q0b28kz/nGkFnE47HEvJdVQbE3TxuOPqqlP1mbLLRbrS4nGW1pvmaNe /Fx1Luzz7JHV9DyJD4vGcIfPjDXn2SmMTmd5GVT/dVDP+em674lmkfAX1pW0ar9vwgeglo JSjl0T+0tUfP0xTCpziKPLeRbNN04y5Z2XjFtPgUElaPuHy5tbZEF57k/xEXMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664037556; a=rsa-sha256; cv=none; b=rJWtZgZ0tO1nJlZKP/VepbrZrD5UBuMBg3QpZeQV5qVj0JdN/89QBauJtli3dboAvqIJJ+ YkUL2OeSKGUc6ID6U6mrRgHhDjXH9erCPLxKIGYgRcG2bnSUpcFlybii3v73AoKtpuGojY OmJM8K95RCekaIVQ3+LAM0D4KFrImX4tp7UuOT5pvSv3ZfcQ7ZDW9AWk2a9WTjVTa4tI+x jz9pC9jdeLnxp3U0Q4XPZ0UtGkgFvPzpQ5fYbQCKQv+dB7ExZlcDchyFTNvGg7+zteNS8L DyMsIUJPceDh82dgaQwMB3zcYYl2LttFe8WqunnjIee1ZxreZsPhyW91pzPEPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=UxuIhoRV; 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: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=polymtl.ca header.s=default header.b=UxuIhoRV; 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: B294530CE2 X-Spam-Score: -2.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: FLkSeKwdghD/ * gnu/packages/instrumentation.scm (libpatch): New variable. --- gnu/packages/instrumentation.scm | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm index c508801c6b..b611f2b141 100644 --- a/gnu/packages/instrumentation.scm +++ b/gnu/packages/instrumentation.scm @@ -22,6 +22,7 @@ (define-module (gnu packages instrumentation) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages commencement) + #:use-module (gnu packages compression) #:use-module (gnu packages datastructures) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) @@ -30,6 +31,7 @@ (define-module (gnu packages instrumentation) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) #:use-module (gnu packages glib) + #:use-module (gnu packages guile) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages libunwind) #:use-module (gnu packages linux) @@ -207,6 +209,68 @@ (define-public flamegraph with the script @command{flamegraph.pl} and many stackcollapse scripts.") (license license:cddl1.0)))) +(define-public libpatch + (package + (name "libpatch") + (version "1.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~old/libpatch") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1sx1sichnnqfi84z37gd04h41vpr8i2vg6yg0jkqxlrv3dys489a")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list + (string-append + "--target=" + ,(platform-linux-architecture + (lookup-platform-by-target-or-system + (or + (%current-target-system) + (%current-system)))))))) + (inputs + (list capstone + elfutils + ;; Uncomment the following if you want tracepoints within libpatch + ;; for debugging. + ;; + ;; lttng-ust + libunwind + liburcu)) + (native-inputs + (list coreutils + ;; test-ftrace.scm + (list coreutils "debug") + ;; For eu-nm in test-ftrace.scm. + (list elfutils "bin") + ;; Put Guile in your profile if you want to use the bindings. + guile-3.0 + ;; test-ftrace.scm + (list guile-3.0 "debug") + gnu-make + ;; test-ftrace.scm + (list gnu-make "debug") + pkg-config + ;; zlib is required by libdw. This can be removed if zlib is put + ;; as a propagated-input of elfutils. + zlib)) + (synopsis "Dynamic binary patcher") + (description + "libpatch is a lightweight C library that can be used by tracers, +debuggers and other tools for insertion of probes in a program at runtime. It +has many strategies to minimize probe overhead and maximize possible +coverage.") + (home-page "https://git.sr.ht/~old/libpatch") + (license (list license:lgpl2.1 license:expat license:gpl3+)) + ;; Libpatch only supports instrumentation for x86_64 right now. Augment + ;; that list in further version. + (supported-systems (list "x86_64-linux")))) + (define-public lttng-modules (package (name "lttng-modules") -- 2.37.3