lkml.org 
[lkml]   [2022]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [perf-tools] Build-error in tools/perf/util/annotate.c with LLVM-14
Hi,

On 2022-07-03 13:54:41 +0200, Sedat Dilek wrote:
> Andres, you have some test-cases how you verified the built perf is OK?

I ran an intentionally expensive workload, monitored it with bpftrace, then
took a perf profile. Then annotated the bpf "function" and verified it looked
the same before / after, using a perf built in a container (and thus
compiling).


Similar with bpftool, I dumped a jited program with a bpftool built with /
without the patches (inside the container using nsenter for the version
without the patches, so I could build it, using nsenter -t $pid -m -p) and
compared both the json and non-json output before / after.

V=4; nsenter -t 847325 -m -p /usr/src/linux/tools/bpf/bpftool/bpftool -j -d prog dump jited id 22 > /tmp/22.jit.json.$V; nsenter -t 847325 -m -p /usr/src/linux/tools/bpf/bpftool/bpftool -d prog dump jited id 22 > /tmp/22.jit.txt.$V

and then diffed the results.


bpf_jit_disasm was harder, because bpf_jit_enable = 2 is broken currently. So
I gathered output in a VM from an older kernel, and used bpf_jit_disasm -f ...
before / after the patches.

Greetings,

Andres Freund

\
 
 \ /
  Last update: 2022-07-03 18:52    [W:0.104 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site