Skip to content

Commit

Permalink
perf: Build with libtraceevent support
Browse files Browse the repository at this point in the history
This enables `perf` to capture kernel-space tracing events, which is e.g.
useful for benchmarking moss' kernel vfs performance when writing to disk.

**Test Plan**

```
ermo@snekhtpc:~/repos/serpent-os/recipes/p/perf [feat/perf-libtraceevent* +4 ~0 -0 !]
$ sudo perf record -e 'ext4:*',cycles:uk -o /tmp/moss-sync-yu-perf.dat moss sync -yu
Refreshed local
Refreshed volatile
No packages to sync
[ perf record: Woken up 65 times to write data ]
[ perf record: Captured and wrote 3.061 MB /tmp/moss-sync-yu-perf.dat (35834 samples) ]
```

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Aug 23, 2024
1 parent 6bc4f79 commit 767cb82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Binary file modified p/perf/manifest.x86_64.bin
Binary file not shown.
6 changes: 5 additions & 1 deletion p/perf/manifest.x86_64.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"pkgconfig(libcap)",
"pkgconfig(libelf)",
"pkgconfig(liblzma)",
"pkgconfig(libtraceevent)",
"pkgconfig(libzstd)",
"pkgconfig(python3)",
"pkgconfig(zlib)"
],
"depends": [
"interpreter(/usr/lib/ld-linux-x86-64.so.2(x86_64))",
"soname(ld-linux-x86-64.so.2(x86_64))",
"soname(libc++.so.1(x86_64))",
"soname(libc.so.6(x86_64))",
"soname(libcap.so.2(x86_64))",
Expand All @@ -24,7 +26,9 @@
"soname(libelf.so.1(x86_64))",
"soname(liblzma.so.5(x86_64))",
"soname(libm.so.6(x86_64))",
"soname(libperl.so(x86_64))",
"soname(libpython3.11.so.1.0(x86_64))",
"soname(libtraceevent.so.1(x86_64))",
"soname(libz.so.1(x86_64))",
"soname(libzstd.so.1(x86_64))"
],
Expand Down Expand Up @@ -254,6 +258,6 @@
}
},
"source-name": "perf",
"source-release": "10",
"source-release": "11",
"source-version": "6.10.0"
}
8 changes: 4 additions & 4 deletions p/perf/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
name : perf
version : "6.10.0"
release : 10
release : 11
summary : Linux profiling with performance counters
license : GPL-2.0-only
homepage : https://perf.wiki.kernel.org/
Expand All @@ -18,6 +18,7 @@ builddeps :
- binary(flex)
- pkgconfig(libcap)
- pkgconfig(libelf)
- pkgconfig(libtraceevent)
- pkgconfig(liblzma)
- pkgconfig(libzstd)
- pkgconfig(python3)
Expand All @@ -30,16 +31,15 @@ build : |
perfexecdir=lib/perf \
CC=clang \
LLVM=1 \
WERROR=0 \
NO_LIBTRACEEVENT=1
WERROR=0
install : |
%make_install -C tools/perf \
prefix=/usr \
lib=lib/perf \
perfexecdir=lib/perf \
CC=clang \
LLVM=1 \
WERROR=0 NO_LIBTRACEEVENT=1
WERROR=0
%install_file %(installroot)/etc/bash_completion.d/perf %(installroot)/%(completionsdir)/perf
rm %(installroot)/etc/bash_completion.d/perf
Expand Down

0 comments on commit 767cb82

Please sign in to comment.