unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Olivier Dion via Guix-patches via <guix-patches@gnu.org>
To: 53351@debbugs.gnu.org
Cc: Olivier Dion <olivier.dion@polymtl.ca>
Subject: [bug#53351] [PATCH] gnu: Add flamegraph.
Date: Tue, 18 Jan 2022 14:20:15 -0500	[thread overview]
Message-ID: <b2d765fde0dda444b882f1dbd24a665a59740ede.1642533568.git.olivier.dion@polymtl.ca> (raw)

* gnu/packages/instrumentation.scm: (flamegraph): New variable.
---
 gnu/packages/instrumentation.scm | 44 +++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index 86b80d65ec..49c58ec382 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -38,12 +38,14 @@ (define-module (gnu packages instrumentation)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #: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 (srfi srfi-26))
 
 (define-public babeltrace
   (package
@@ -153,6 +155,46 @@ (define-public dyninst
 with a handful of C++ libraries.")
     (license license:lgpl2.1+)))
 
+(define-public flamegraph
+  (package
+    (name "flamegraph")
+    (version "1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/brendangregg/FlameGraph")
+                    ;; No new version since 2019, but there's still some new
+                    ;; important commits.
+                    (commit "810687f180f3c4929b5d965f54817a5218c9d89b")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1lg02mxzdsm9szn4vcmx76c1bw9gqmxqk8n6v63v03036sc83s22"))))
+
+    (build-system copy-build-system)
+    (arguments
+     `(#:install-plan
+       ',(map (cut list <> "bin/")
+              '("flamegraph.pl"
+                "stackcollapse.pl"
+                "stackcollapse-perf.pl"
+                "stackcollapse-pmc.pl"
+                "stackcollapse-stap.pl"
+                "stackcollapse-instruments.pl"
+                "stackcollapse-vtune.pl"
+                "stackcollapse-jstack.pl"
+                "stackcollapse-gdb.pl"
+                "stackcollapse-go.pl"
+                "stackcollapse-vsprof.pl"
+                "stackcollapse-wcp.pl"))))
+    (inputs (list perl))
+    (home-page "http://www.brendangregg.com/flamegraphs.html")
+    (synopsis "Stack trace visualizer")
+    (description "Flamegraph is a collection of scripts that generate
+interactive SVGs out of traces genated from various tracing tools.  It comes
+with the script @command{flamegraph.pl} and many stackcollapse scripts.")
+    (license license:cddl1.0)))
+
 (define-public lttng-ust
   (package
     (name "lttng-ust")
-- 
2.34.0





             reply	other threads:[~2022-01-18 19:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 19:20 Olivier Dion via Guix-patches via [this message]
2022-01-20 14:02 ` bug#53351: [PATCH] gnu: Add flamegraph Mathieu Othacehe
2022-01-20 14:27   ` [bug#53351] " 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=b2d765fde0dda444b882f1dbd24a665a59740ede.1642533568.git.olivier.dion@polymtl.ca \
    --to=guix-patches@gnu.org \
    --cc=53351@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).