[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: Add libpfm4.

From: Ludovic Courtès
Subject: 02/02: gnu: Add libpfm4.
Date: Thu, 26 Apr 2018 10:10:37 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 2690b6ce7da78eda4d936e3344fc6684a176ac81
Author: Rouby Pierre-Antoine <address@hidden>
Date:   Fri Apr 20 17:30:57 2018 +0200

    gnu: Add libpfm4.
    * gnu/packages/linux.scm (libpfm4): New variable.
    Signed-off-by: Ludovic Courtès <address@hidden>
 gnu/packages/linux.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8fc9c56..4d24463 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4680,3 +4680,50 @@ high-speed networking devices.")
     ;; Only the x86_64 architecure is supported.
     (supported-systems '("x86_64-linux"))
     (license (list license:bsd-3 license:gpl2)))) ; dual
+(define-public libpfm4
+  (package
+    (name "libpfm4")
+    (version "4.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/perfmon2/"
+                                  name "/libpfm-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:modules ((guix build utils)
+                  (guix build gnu-build-system))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (delete 'check)
+                  (replace 'build
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (setenv "CC" "gcc")
+                        (invoke "make")
+                        #t)))
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (invoke "make"
+                                (string-append "PREFIX=" out)
+                                "install")
+                        #t))))))
+    (synopsis "Performance event monitoring library")
+    (description
+     "This package provides a library called libpfm4, which is used to develop
+monitoring tools exploiting the performance monitoring events such as those
+provided by the Performance Monitoring Unit (PMU) of modern processors.
+Libpfm4 helps convert from an event name, expressed as a string, to the event
+encoding that is either the raw event as documented by the hardware vendor or
+the OS-specific encoding.  In the latter case, the library is able to prepare
+the OS-specific data structures needed by the kernel to setup the event.
+libpfm4 provides support for the @code{perf_events} interface, which was
+introduced in Linux 2.6.31.")
+    (home-page "";)
+    (license license:expat)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]