Re: [PATCH v2 0/5] perf test trace: Reduce test failures and make error messages verbose
From: Howard Chu
Date: Mon May 19 2025 - 15:28:11 EST
Hello Ian,
On Mon, May 19, 2025 at 10:00 AM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
<SNIP>
> ```
> --- start ---
> test child forked, pid 279547
> Checking if vmlinux BTF exists
> Testing perf trace's string augmentation
> Testing perf trace's buffer augmentation
> Testing perf trace's struct augmentation
> BTF struct augmentation test failed, output:
> sleep/279619 clock_nanosleep(0, 0, {1,1,}, 0x7ffcd47b6450) = 0
Thank you so much for testing it :)
My bad, I have just realized this is because of the data in the
timespec, nothing to do with libbpf... The tv_nsec has a value of 1. I
think the 'sleep' on your machine has a different implementation. On
my machine, the second member has a value of 0, see below:
~~~
$ sudo /tmp/perf/perf trace -e clock_nanosleep -- sleep 1
0.000 (1000.196 ms): sleep/54261 clock_nanosleep(rqtp: { .tv_sec:
1, .tv_nsec: 0 }, rmtp: 0x7ffe13529550) = 0
$ strace -e clock_nanosleep -- sleep 1
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=0}, 0x7fff859365a0) = 0
+++ exited with 0 +++
~~~
Can you please run any of the commands above and see what
happens(please change the perf executable path)? If you get 'rqtp: {
.tv_sec: 1, .tv_nsec: 1 }' then I will just make the regex less
strict, because it differs between different 'sleep' implementations
instead of having anything to do with perf itself.
Thanks,
Howard