From patchwork Thu Dec 9 22:56:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: paul X-Patchwork-Id: 35095 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B5E4527BBEA; Thu, 9 Dec 2021 22:58:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,T_SPF_HELO_PERMERROR, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 722F627BBE9 for ; Thu, 9 Dec 2021 22:58:21 +0000 (GMT) Received: from localhost ([::1]:41664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvSMm-0007Ud-1Q for patchwork@mira.cbaines.net; Thu, 09 Dec 2021 17:58:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvSMU-0007Rg-WC for guix-patches@gnu.org; Thu, 09 Dec 2021 17:58:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvSMU-0003BF-Nd for guix-patches@gnu.org; Thu, 09 Dec 2021 17:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvSMU-0004u0-Em for guix-patches@gnu.org; Thu, 09 Dec 2021 17:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52397] [PATCH] gnu: Add gprof2dot. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Dec 2021 22:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52397 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52397@debbugs.gnu.org Cc: Giacomo Leidi X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163909064318794 (code B ref -1); Thu, 09 Dec 2021 22:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Dec 2021 22:57:23 +0000 Received: from localhost ([127.0.0.1]:44974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvSLq-0004t4-O1 for submit@debbugs.gnu.org; Thu, 09 Dec 2021 17:57:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:42474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvSLp-0004sw-6u for submit@debbugs.gnu.org; Thu, 09 Dec 2021 17:57:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvSLo-0006r9-VT for guix-patches@gnu.org; Thu, 09 Dec 2021 17:57:20 -0500 Received: from latitanza.investici.org ([82.94.249.234]:52715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvSLl-00030O-Id for guix-patches@gnu.org; Thu, 09 Dec 2021 17:57:20 -0500 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4J98YY5RhkzGp59; Thu, 9 Dec 2021 22:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1639090625; bh=dQJtseTDTZaJFDbX0s9ZZChX7MOqw+KV/LvLazGbmuA=; h=From:To:Cc:Subject:Date:From; b=FpbY5nYZ8LhjC/H+LV1Mp6BZSyCZuzOkXYuMwJBtsNRdeXyn7/aC5ydTEXFXQ9kUG TklAmijNzzQ+jUh2HWCK18Qd64xEGgQoIvNaMb/Bl0ODS71ung96A05ognmbnEcFrk hW3blzCalb6BpxolfXS8GhXxtQ6NGfCMR4Nvq8Ig= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4J98YY30cwzGp56; Thu, 9 Dec 2021 22:57:05 +0000 (UTC) Date: Thu, 9 Dec 2021 23:56:32 +0100 Message-Id: <20211209225632.12156-1-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Received-SPF: pass client-ip=82.94.249.234; envelope-from=goodoldpaul@autistici.org; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: paul X-getmail-retrieved-from-mailbox: Patches * gnu/packages/graphviz.scm (gprof2dot): New variable. --- gnu/packages/graphviz.scm | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) base-commit: f3af1fb0bcbcbe18ab773374efe606e90107cfb6 diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index ac896fb577..6d3bb292ac 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Pjotr Prins ;;; Copyright © 2021 Bonface Munyoki Kilyungi +;;; Copyright © 2021 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -456,3 +457,45 @@ (define-public dot2tex @item Using backend specific styles to customize the output @end itemize") (license license:expat))) + +(define-public gprof2dot + (package + (name "gprof2dot") + (version "2021.02.21") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jrfonseca/gprof2dot") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jjhsjf5fdi1fkn7mvhnzkh6cynl8gcjrygd3cya5mmda3akhzic")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "tests/test.py"))))))) + (native-inputs + `(("graphviz" ,graphviz))) + (home-page "https://github.com/jrfonseca/gprof2dot") + (synopsis "Generate a dot graph from the output of several profilers") + (description "This package provides a Python script to convert the output +from many profilers into a dot graph. + +It can: + +@itemize + +@item prune nodes and edges below a certain threshold; +@item use an heuristic to propagate time inside mutually recursive functions; +@item use color efficiently to draw attention to hot-spots; +@item work on any platform where Python and Graphviz is available. + +@end itemize") + (license license:lgpl3+)))