Skip to content

Commit 3857a22

Browse files
committed
WIP: use perf probes to trace assembly calls
1 parent d399d3e commit 3857a22

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

profile_asm.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# list all the assembly routines we can put probes on related to itx.rs, etc.
4+
# perf probe -x target/release/dav1d --funcs=dav1d_inv_txfm_add_* > rav1d_inv_txfm_add.list.txt
5+
6+
# count number of assembly routines
7+
# perf probe -x target/release/dav1d --funcs=dav1d_inv_txfm_add_* | wc -l
8+
9+
# build dav1d release mode without trimming unused assembly routines
10+
# meson build --buildtype release -Dtrim_dsp=false
11+
# ninja -C build
12+
13+
# perf probe -x build/src/libdav1d.so.6.8.0 --funcs=dav1d_inv_txfm_add_* > dav1d_inv_txfm_add.list.txt
14+
# perf probe -x build/src/libdav1d.so.6.8.0 --funcs=dav1d_inv_txfm_add_* | wc -l
15+
16+
# FINDING: confirmed that rav1d/main has the same itx asm routines as the dav1d binary
17+
18+
perf probe -x target/release/dav1d dav1d_inv_txfm_add_adst_adst_4x8_8bpc_avx2
19+
20+
perf record -e probe:dav1d_inv_txfm_add_adst_adst_4x8_8bpc_avx2
21+
22+
perf record -e probe:dav1d_inv_txfm_add_adst_adst_4x8_8bpc_avx2 target/debug/dav1d

0 commit comments

Comments
 (0)