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 cycles -e "ext4:*" -o /tmp/moss-sync-u.dat moss sync -u
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-u.dat (35834 samples) ]
```

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Aug 22, 2024
1 parent 12f4b39 commit 4e3c3b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Binary file modified p/perf/manifest.x86_64.bin
Binary file not shown.
4 changes: 4 additions & 0 deletions 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
6 changes: 3 additions & 3 deletions p/perf/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 4e3c3b2

Please sign in to comment.