diff mbox series

[bug#53351] gnu: Add flamegraph.

Message ID b2d765fde0dda444b882f1dbd24a665a59740ede.1642533568.git.olivier.dion@polymtl.ca
State Accepted
Headers show
Series [bug#53351] gnu: Add flamegraph. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Olivier Dion Jan. 18, 2022, 7:20 p.m. UTC
* gnu/packages/instrumentation.scm: (flamegraph): New variable.
---
 gnu/packages/instrumentation.scm | 44 +++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

Comments

Mathieu Othacehe Jan. 20, 2022, 2:02 p.m. UTC | #1
Hello Olivier,

Something went wrong with the patch export format as the commit message
appears as a separate MIME part here. Did you use "git send-email"?

> +    (version "1.0")

I modified the version to: 1.0-1.810687f so that it takes the selected
commit into account.

Pushed as 410211c42388f99c22a7b4140553be35e696400e.

Thanks,

Mathieu
Olivier Dion Jan. 20, 2022, 2:27 p.m. UTC | #2
On Thu, 20 Jan 2022, Mathieu Othacehe <othacehe@gnu.org> wrote:
> Hello Olivier,
>
> Something went wrong with the patch export format as the commit message
> appears as a separate MIME part here. Did you use "git send-email"?

Yes as I always I use git-send-email.  Weird.


>> +    (version "1.0")
>
> I modified the version to: 1.0-1.810687f so that it takes the selected
> commit into account.
>
> Pushed as 410211c42388f99c22a7b4140553be35e696400e.

Thank you!
diff mbox series

Patch

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")