GNU bug report logs -
#56962
[PATCH] gnu: Add perf-tools.
Previous Next
Reported by: Olivier Dion <olivier.dion <at> polymtl.ca>
Date: Wed, 3 Aug 2022 23:45:02 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56962 in the body.
You can then email your comments to 56962 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#56962
; Package
guix-patches
.
(Wed, 03 Aug 2022 23:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Olivier Dion <olivier.dion <at> polymtl.ca>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 03 Aug 2022 23:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/instrumentation.scm (perf-tools): New variable.
---
gnu/packages/instrumentation.scm | 58 ++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index 4e23e9bed4..f52cf11505 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -18,13 +18,17 @@
(define-module (gnu packages instrumentation)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages commencement)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages engineering)
+ #:use-module (gnu packages file)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages glib)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages libunwind)
@@ -290,6 +294,60 @@ (define-public lttng-tools
@code{lttng-relayd} for network streaming.")
(license (list license:gpl2 license:lgpl2.1))))
+(define-public perf-tools
+ (package
+ (name "perf-tools")
+ (version "1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/brendangregg/perf-tools")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ab735idi0h62yvhzd7822jj3555vygixv4xjrfrdvi8d2hhz6qn"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ ',(append
+ (map (cut list <> "bin/")
+ '("disk/bitesize"
+ "fs/cachestat"
+ "execsnoop"
+ "kernel/funccount"
+ "kernel/funcgraph"
+ "kernel/funcslower"
+ "kernel/functrace"
+ "iolatency"
+ "iosnoop"
+ "killsnoop"
+ "kernel/kprobe"
+ "opensnoop"
+ "misc/perf-stat-hist"
+ "tools/reset-ftrace"
+ "syscount"
+ "net/tcpretrans"
+ "system/tpoint"
+ "user/uprobe"))
+ '(("man/man8/" "share/man/man8")))))
+ (propagated-inputs
+ (list
+ bash
+ coreutils ; cat + rm
+ gawk
+ gcc-toolchain ; objdump + ldconfig
+ file
+ perf
+ perl
+ procps ; sysctl
+ which))
+ (home-page "https://github.com/brendangregg/perf-tools")
+ (synopsis "Performance analysis tools")
+ (description "Perf-tools is a collection of scripts for performance
+analysis and instrumentation based on Linux perf_events (aka perf) and
+ftrace.")
+ (license (list license:gpl2))))
+
(define-public uftrace
(package
(name "uftrace")
--
2.37.1
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Fri, 05 Aug 2022 12:44:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Olivier Dion <olivier.dion <at> polymtl.ca>
:
bug acknowledged by developer.
(Fri, 05 Aug 2022 12:44:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 56962-done <at> debbugs.gnu.org (full text, mbox):
> * gnu/packages/instrumentation.scm (perf-tools): New variable.
Nice one. It looks like execsnoop is not working here, any idea why?
--8<---------------cut here---------------start------------->8---
mathieu <at> meije ~/guix [env]$ sudo execsnoop
Tracing exec()s. Ctrl-C to end.
ERROR: adding a kprobe for execve. Exiting.
--8<---------------cut here---------------end--------------->8---
Something missing in Guix System kernel configuration maybe?
Pushed anyway,
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#56962
; Package
guix-patches
.
(Fri, 05 Aug 2022 14:19:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 56962-done <at> debbugs.gnu.org (full text, mbox):
On Fri, 05 Aug 2022, Mathieu Othacehe <othacehe <at> gnu.org> wrote:
>> * gnu/packages/instrumentation.scm (perf-tools): New variable.
>
> Nice one. It looks like execsnoop is not working here, any idea why?
>
> --8<---------------cut here---------------start------------->8---
> mathieu <at> meije ~/guix [env]$ sudo execsnoop
> Tracing exec()s. Ctrl-C to end.
> ERROR: adding a kprobe for execve. Exiting.
> --8<---------------cut here---------------end--------------->8---
>
Hmm I don't know. `sudo cat /sys/kernel/debug/kprobes/enabled' gives
`1' so kprobe should work correctly. Also:
--8<---------------cut here---------------start------------->8---
$ zcat /proc/config.gz | grep KPROBES
CONFIG_KPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
--8<---------------cut here---------------end--------------->8---
killsnoop also fails. It seems that the problem is here:
--8<---------------cut here---------------start------------->8---
133 ### select awk
134 # workaround for mawk fflush()
135 [[ -x /usr/bin/mawk ]] && awk="mawk" && mawk -W interactive && \
136 [ $? -eq 0 ] && awk="mawk -W interactive"
137 # workaround for gawk strtonum()
138 [[ -x /usr/bin/gawk ]] && awk="gawk --non-decimal-data"
--8<---------------cut here---------------end--------------->8---
Substituing /usr/bin/gawk seems to fix it. I'll open a new bug thread.
--
Olivier Dion
oldiob.dev
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 03 Sep 2022 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.